Is there a way to get the function parameter names of a function dynamically?(有没有一种方法可以动态获取函数的函数参数名称?)
Let's say my function looks like this:(假设我的函数如下所示:)
function doSomething(param1, param2, .... paramN){
// fill an array with the parameter name and value
// some other code
}
Now, how would I get a list of the parameter names and their values into an array from inside the function?(现在,如何从函数内部将参数名称及其值的列表放入数组中?)
ask by vikasde translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…