1.

typeof “null” in JavaScript is _______(a) number(b) string(c) object(d) undefinedThis question was posed to me during an online exam.The question is from Essential JavaScript and jQuery in section HTML Tables, Javascript & Jquery Basics of HTML

Answer» CORRECT answer is (c) OBJECT

For EXPLANATION: TYPEOF “null” in JavaScript is an object. Basically null INDICATES nothing like it is a thing that does not exist. It is like a bug in JavaScript that its typeof comes to be an object. For emptying an object we can set it to null.


Discussion

No Comment Found

Related InterviewSolutions