Interview Preparation Coding Interview Objective
May 09, 2013

What is the output of following JavaScript code?

<script type="text/javascript">
var cst=((45%2)==0)?"hello":"bye";
document.write(cst);
</script>

Choose the correct answer:
A) hello
B) bye
C) Hello bye
D) Error in string handling
Detailed Explanation

Option  B is the right Answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback