adplus-dvertising
frame-decoration

Question

What is the difference between the two lines given below ?

!!(obj1 && obj2);
(obj1 && obj2);

a.

Both the lines result in a boolean value "True"

b.

Both the lines result in a boolean value "False"

c.

Both the lines checks just for the existence of the object alone

d.

The first line results in a real boolean value whereas the second line merely checks for the existence of the objects

Answer: (d).The first line results in a real boolean value whereas the second line merely checks for the existence of the objects

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the difference between the two lines given below ? !!(obj1 && obj2); (obj1 && obj2);

Similar Questions

Discover Related MCQs

Q. For the below mentioned code snippet:

var o = new Object();

The equivalent statement is:

Q. If you have a function f and an object o, you can define a method named m of o with

Q. Consider the following code snippet :

var string2Num=parseInt("123xyz");

The result for the above code snippet would be :

Q. Consider the following code snippet :

var tensquared = (function(x) {return x*x;}(10));

Will the above code work ?

Q. Do functions in JavaScript necessarily return a value ?

Q. Consider the following code snippet :

var grand_Total=eval("10*10+5");

The output for the above statement would be :

Q. Which is an equivalent code to invoke a function m of class o that expects two arguments x and y?

Q. Which of the following is the correct code for invoking a function without this keyword at all, and also too determine whether the strict mode is in effect?

Q. A function with no return value is called

Q. What will happen if a return statement does not have an associated expression?

Q. What is the purpose of a return statement in a function?

Q. When does the function name become optional in JavaScript?

Q. The function definitions in JavaScript begins with

Q. The method or operator used to identify the array is

Q. The reduce and reduceRight methods follow a common operation called

Q. The primary purpose of the array map() function is that it

Q. Consider the following code snippet :

var a = [1,2,3,4,5];
a.slice(0,3);

What is the possible output for the above code snippet ?

Q. What will happen if reverse() and join() methods are used simultaneously ?

Q. Consider the following code snippet :

if (!a[i]) continue ;

What is the observation made ?

Q. The pop() method of the array does which of the following task ?