JavaScript Puzzlers – Puzzles That Make You Think (presented at Adobe MAX 2013)

I’ve just recently returned from Adobe MAX 2013, Adobe’s annual “Creativity Conference”.  I had the opportunity to host a session this year.  I ended up doing a presentation called “JavaScript Puzzlers”.  In short, my presentation presents the audience with short, code-based “puzzles” which the audience then has to solve.  The puzzles themselves are quite simple, anywhere from 2 to 20 lines of code.  The answers, however, more often than not, can be quite surprising.  Well, the video from the presentation has finally gone online and so here it is…

I’ve also made the full set of slides available here…

We had a great turnout, and some fantastic discussions!  Thanks to everyone who was able to attend!  I had a blast!

 

Charles

 

One Response to JavaScript Puzzlers – Puzzles That Make You Think (presented at Adobe MAX 2013)

  1. Murvin says:

    In addition to the Hoisting puzzler, it will be more puzzling for this code, which tries to assign global variable name to local, which result in undefined rather than having the global variable value:
    =====================
    var name = “World!”;
    function b() {
    var name = name;
    if (typeof name === ‘undefined’) {
    console.log(“Goodbye ” + name);
    } else {
    console.log(“Hello ” + name);
    }
    }
    b();