|
|
|
|
|
by hkuo
4839 days ago
|
|
I'm probably not the best person to have a debate about this since I don't have a traditional CS background. I dabble in many different languages, but I'll never claim to be an expert in any. To your point about this not being in the book JavaScript the Good Parts, I re-downloaded my purchase from Oreilly to double check, and throughout the book, all functions are declared as variables. Here's a screenshot from the second page of the "Functions" chapter, which is the first time a function declaration is introduced in the book: https://dl.dropbox.com/u/1517499/Screen%20Shot%202013-03-26%... Edit: Just an edit to add that I quickly perused the pdf and couldn't pick out anywhere where he explained why he recommends this way. In any case, I'm always open to any arguments one way or the other. |
|
It's this:
var foo = function() { redeclaration(); }
that I believe he's referring to, unless I'm mistaken.