Quick CompSci question after reading through the 'Useful Misc. Code' thread. When, if ever, is it necessary to declare variables in the declaration of the function or task. Along with that, what, if any, difference does it make? I've found that variables showing up in the function declaration line work fine even if never explicitly declared at a higher level or within the function before being used.
In short, what is the difference between:
function derp (let herp, let dedurp) {
do stuff;
}
function derp (herp, dedurp) {
do stuff;
}