Is it possible to create a new variable with name equal to function argument?
var add = function(name, age) {
var name = age;
}
add('bob', 30);
Obviously this doesn't work, but I hope you can see what I am trying to achieve.
Is it possible to create a new variable with name equal to function argument?
var add = function(name, age) {
var name = age;
}
add('bob', 30);
Obviously this doesn't work, but I hope you can see what I am trying to achieve.