Website Developer Question:

Download Job Interview Questions and Answers PDF

Tell me what Is The Difference Between Undefined Value And Null Value?

Website Developer Interview Question
Website Developer Interview Question

Answer:

<undefined> Vs. <null> value.

1. A variable will have <undefined> value if it has declaration but not assigned any value.

2. A variable will yield a <null> value if assigned with null.

3. <undefined> is a type itself whreeas <null> is an object.

4. <undefined> value is set via JavaScript engine whereas null value is set directly in the code.

Download Website Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me how Do You Distinguish Between An Undefined And Undeclared Variable?Tell me what Is Z-Index And How Does It Work?