一、1)函數(shù)聲明
? ? ? ? ? ? ? ? function ?num(a1,a2){
? ? ? ? ? ? ? ? ? ? ? ? ? ?return a1+a2;
? ? ? ? ? ? ? ? }
? ? ? ?2)函數(shù)表達(dá)式
? ? ? ? ? ? ? ? ?var num2 = function ?(a1,a2){
? ? ? ? ? ? ? ? ? ? ? ? ? ? return a1+a2;
? ? ? ? ? ? ? ? ? }
? ? ? ?3)面向?qū)ο蠓绞?/p>
? ? ? ? ? ? ? ?var num3 = new Function("a1", "a2", "return a1+a2");
二、四種調(diào)用模式,函數(shù)調(diào)用模式、方法調(diào)用模式、構(gòu)造器模式、apply模式。(其最主要的區(qū)別在于關(guān)鍵字this的意義)