我看到以下JavaScript函數完全相同,那麼它們之間的區別是而不是語法。 的功能是:這兩者有什麼區別?
var functionName=function(){
//some code here
};
function functionName(){
//some code here
}
我打電話給他們以同樣的方式爲:
functionName();
請不要」告訴我有語法不同,除此之外有沒有像
1)speed of execution
2)Memory utilization etc.
任何區別
在此先感謝!
函數表達式VS函數聲明 – elclanrs 2013-03-05 04:54:42
Exaact重複http://stackoverflow.com/questions/336859/javascript-var-functionname-function-vs-function-functionname – 2013-03-05 04:55:37