What is the output of below code?

<script type = "text/javascript" language = "javascript">
function check_value()
{
alert("1"+2+4);
}
</script>

 Posted by vishalneeraj-24503 on 12/10/2013 | Category: JavaScript Interview questions | Views: 1207 | Points: 40
Answer:

Since 1 is in double quotation,so it will be treated as string,everything is a string over here,so the result will be 124.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response