News for hackers. Stuff that matters.
Re:Airbnb JavaScript Style Guide by svieira on Thursday July 02, 2015 @11:02PM (#9823181)
The fact that `typeof` is no longer safe [1][2] is news to me - it feels like they put in air bags and removed the seat belts.

  [1]: https://github.com/airbnb/javascript#14.1
  [2]: http://es-discourse.com/t/why-typeof-is-no-longer-safe/15
Re:Airbnb JavaScript Style Guide by AgentME on Friday July 03, 2015 @12:36AM (#9823494)
The only code affected by this would be code that uses typeof to check for the existence of a variable the same code defines later, which sounds like dumb code to begin with. I don't think there's any valid uses of typeof on possibly undefined variables besides checking for browser built-ins.
Re:Airbnb JavaScript Style Guide by mAritz on Wednesday July 08, 2015 @01:48AM (#9850012)
Using typeof(foo) === "undefined" is actually something that comes from back when it was pretty common to pollute the global namespace. There were actual javascript plugins/libraries/snippets that defined undefined and thus broke code that compared to it.
Re:Airbnb JavaScript Style Guide by ahoge on Friday July 03, 2015 @11:15AM (#9826006)
It's not an issue since using a non-hoisted variable before it was declared is an error.

Your editor should immediately highlight this error with a squiggly line.

Re:Airbnb JavaScript Style Guide by wwweston on Friday July 03, 2015 @12:18AM (#9823438)
That's... interesting. I guess it makes a little sense -- `let` seems to be for developers who don't like `var` semantics. Usually that seems to be about wanting block instead of function scope, but maybe there's a contingent that dislikes `undefined` too.
Re:Airbnb JavaScript Style Guide by masklinn on Friday July 03, 2015 @05:09AM (#9824416)
`let` doesn't disappear `undefined` though.

    >> let a;
    >> a;
    undefined