News for hackers. Stuff that matters.
Re:Javascript patterns by rnd33 on Wednesday January 01, 2014 @08:04PM (#6997624)
Yes, a function definition is hoisted too but its implementation is always hoisted together with its declaration, preventing some bugs caused by variable hoisting.

I made an example here: http://pastebin.com/2nS9EDPb

(Please correct me if I'm wrong, I wasn't aware for example that function declarations were treated as variables, redefinable etc)

There are no comments on this comment yet.