What is the output of below Javascript code?

function check_value()
{
var value = new Boolean(false);
alert(String(value));
}

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

Output will be "false".

As we know that,Boolean data-type takes only True and False value.

The String() function converts the value of an object to a string. That's why it would be False.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response