Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jackweirdy
on May 1, 2014
|
parent
|
context
|
favorite
| on:
“var functionName” vs “function functionName”
The variables are the same. Var statements get hoisted to the beginning of the function.
That said, it is cleaner to only 'var' each variable once, to suppress this confusion.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
That said, it is cleaner to only 'var' each variable once, to suppress this confusion.