scripting subtlties [closed]
- by jpmyob
Possible Duplicates:
When to use anonymous JavaScript functions?
Is there any difference between var name = function() {} & function name() {} in Javascript?
in javascript (and other scripting languages) what is the 'real' difference between these two syntax:
a) function myFun(x) { yadda yadda }
b) myFun(x) = function { yadda yadda }
to a casual observer - no 'real' difference - you still call either as myFun()...and they still return the same thing, so if reference and return are identical - is it a preference or is there some difference in the code parsing engine that treats these two differently - and if so - when would you use one over the other???