你的位置:首页 > 软件开发 > Java > javascript 中的 parameter vs arguments

javascript 中的 parameter vs arguments

发布时间:2016-06-08 20:00:18
像往常一样简单粗暴地看码:A parameter is the variable which is part of the method’s signature (method declaration). An argument is an expressio ...

像往常一样简单粗暴地看码:

A parameter is the variable which is part of the method’s signature (method declaration). An argument is an expression used when calling the method.

Consider the following code:

function add (a,b){ return a + b ;}add(1,2);

Here a and b are the parameters, and 1and 2 are the arguments.

原标题:javascript 中的 parameter vs arguments

关键词:JavaScript

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。