adplus-dvertising
frame-decoration

Question

Consider the following code snippet:

let x=x+1;
console.log(x);

What will be the result for the above code snippet?

a.

0

b.

Null

c.

ReferenceError

d.

NaN

Answer: (d).NaN

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Consider the following code snippet: let x=x+1; console.log(x); What will be the result for the above code snippet?