What is the difference between the two lines given below ?
!!(obj1 &&
Home | Discussion Forum
What is the difference between the two lines given below ? !!(obj1 && obj2); (obj1 && obj2);
Both the lines result in a boolean value “True”
Both the lines result in a boolean value “False”
Both the lines checks just for the existence of the object alone
The first line results in a real boolean value whereas the second line merely checks for the existence of the objects
Answer : D
View More Related Question
1) Do functions in JavaScript necessarily return a value ?
It is mandatory
Not necessary
Few functions return values by default
All of the mentioned
View Answer
2) Consider the following code snippet
o.m(x,y);
Which is an equivalent code for the above code snippet?
3) Which is an equivalent code to invoke a function m of class o that expects two arguments x and y?
4) When does the function name become optional in JavaScript?
When the function is defined as a looping statement
When the function is defined as expressions
When the function is predefined
All of the mentioned
View Answer
5) Consider the following code snippet :
var string2Num=parseInt("123xyz");
The result for the above code snippet would be :