JavaScript Zen

Is undefined equal to undefined?

That’s the question! Crockford says it is not, but let see the experiment.

var a, b;
console.log(typeof a);
console.log(a === b);

the answer is – it is.

Related posts:

  1. Does JavaScript undefined Equals undefined?
  2. javascript: what is typeof typeof
  3. JavaScript closures in brief
This entry was posted in javascript, snippets and tagged , , . Bookmark the permalink.

3 Responses to JavaScript Zen

  1. amaya says:

    what is zen?

  2. Stoimen says:

    Well, Zen describes the way things are ugly and beautiful at the same time in JavaScript!

  3. amaya says:

    aah so

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">