Front End Developer (AngularJS) Question:
Download Questions PDF

Explain difference between null and undefined?


This can be tricky and the best way to keep in your head is to memorise because if you try to relate javascript null to other languages, it will get more confusing.
In javascript, null is an object with no value and undefined is a type.

typeof null; // "object"
typeof undefined; // "undefined"
var a;
var b = null;
a == b; // "true" because their values are the same
a === b; // "false". they have different types

Download Front End Developer (AngularJS) Interview Questions And Answers PDF

Previous QuestionNext Question
Assume you arrive at a new company that has 3 competing style sheets, how would you best integrate them into the site?Tell me how will you initialize a select box with options on page load?