I have many pages with functions that appear only once, which I am sure is really typical. I read that it's the best idea to use the local scope for functions when possible because the local scope is searched first, thereby making the function found sooner.
If I have no intention of reusing a function, is this the best way to create and use this function?
var doCancel = function doCancel() {
// DO SOME CANCELLING TYPE STUFF
}
Or is this a better way?
function doCancel() {
// DO SOME CANCELLING TYPE STUFF
}