News for hackers. Stuff that matters.
Re:Is JavaScript getting worse? by kaoD on Monday January 12, 2015 @08:15AM (#8873700)
If I'm not mistaken that's not hoisting, since that code will work as long as a() is called after b is declared regardless of the hoisting. Keep in mind b is only accessed when a() is actually executed, not when it's declared!

Hoisting works like this:

    a();

    function a() {
      console.log("FOO");
    }
Which might or might not be more readable, depending on your tastes.
Re:Is JavaScript getting worse? by gildas on Monday January 12, 2015 @08:27AM (#8873739)
You're right, my example was not very good indeed.