Say I am creating a function named register(name)
, and I want to assign a variable in it in the name of the variable name, like I pass:-
function register(oidu){
var oidu = "idk";
}
and then I pass again:-
function register(lol){
var lol = "idk";
}
You may observe that the variable is named as the name(value passed in function). I want to do like this in reality. How can I do this?