# What will be the output of the following code snippet var x=12; var y=8; var res=eval("x+y"); document.write(res);

1.  20

2.  x+y

3.  128

4.  None of the above

4

20

Explanation :
No Explanation available for this question

# What will be the output of the following code snippet (function(){ setTimeout(()=> console.log(1),2000); console.log(2); setTimeout(()=> console.log(3),0); console.log(4); })();

1.  1 2 3 4

2.  2 3 4 1

3.  2 4 3 1

4.  4 3 2 1

4

2 4 3 1

Explanation :
No Explanation available for this question

# What will be the output of the following code snippet (function(a){ return (function(){ console.log(a); a = 6; })() })(21);

1.  6

2.  NaN

3.  21

4.  None of the above

4

21

Explanation :
No Explanation available for this question

# What will be the output of the following code snippet function solve(arr, rotations){ if(rotations == 0) return arr; for(let i = 0; i < rotations; i++){ let element = arr.pop(); arr.unshift(element); } return arr; } // solve([44, 1, 22, 111], 5);

1.  [111, 44, 1, 22]

2.  [44, 1, 22, 111]

3.  [111, 44, 1, 22]

4.  [1, 22, 111, 44]

4

[111, 44, 1, 22]

Explanation :
No Explanation available for this question

# What will be the output for the following code snippet function sQFunc() { document.getElementById("example").innerHTML=Math.sqrt(81); } sQFunc();

1.  9

2.  81

3.  Error

4.  0

4

9

Explanation :
No Explanation available for this question

# What will be the output of the following code snippet var a = 1; var b = 0; while (a

1.  4 10 18

2.  1 2 3

3.  1 4 7

4.  None of the above

4

4 10 18

Explanation :
No Explanation available for this question

# What will be the output of the following code snippet var a = Math.max(); var b = Math.min(); console.log(a); console.log(b);

1.  -Infinity Infinity

2.  Infinity -Infinity

3.  Infinity Infinity

4.  -Infinity -Infinity

4

-Infinity Infinity

Explanation :
No Explanation available for this question

# What will be the output of the following code snippet var a = Math.max() < Math.min(); var b = Math.max() > Math.min(); console.log(a); console.log(b);

1.  true false

2.  false true

3.  true true

4.  false false

4

true false

Explanation :
No Explanation available for this question

# What will be the output of the following code snippet var abc = 2 * true + true + true; console.log(abc);

1.  4

2.  0

3.  Error

4.  5

4

4

Explanation :
No Explanation available for this question

# What is the output of the following code snippet console.log(NaN === NaN);

1.  false

2.  true

3.  undefined

4.  Error

4

false

Explanation :
No Explanation available for this question

## Interview Questions

 MongoDB Java Script Node JS PHP JQuery Python