JS

runtime.js

One spine: the evolution of JavaScript

Pick an era, expand a concept, and see where it lands in today's runtimes. Every snippet can be dropped straight into the sandboxed console — the event loop panel then shows real, instrumented execution, not a looping animation.

Pre-ES6

ES51995 – 2014

One function scope, one binding keyword, and callbacks all the way down. Everything that came later is a reaction to this era's sharp edges.

There are no classes underneath — only objects linked to other objects. `class` in later eras is syntax over this exact mechanism.

function Signal(name) {
  this.name = name;
}
Signal.prototype.describe = function () {
  return "Signal<" + this.name + ">";
};

var s = new Signal("tick");
console.log(s.describe());
console.log(Object.getPrototypeOf(s) === Signal.prototype);

Interview gotchas

15 genuinely tricky, well-known snippets — event-loop ordering, closures in loops, and `this`-binding traps. Open one, read the gotcha, then drop it straight into the sandboxed console to watch it really run.

Event loop
Closures & scope
this binding
Promises & async
Coercion & equality
Built-in traps