• Question
  • creating variables with custom names

im trying to do something with functions and came into a problem:
when making a variable i dont know how to set the variable name to a function's variable.
example:

createVariable("hi",200,200);
function createVariable(NAME,x,y) {
var NAME = [x,y];
}
output: hi = [200,200]

is there a way to do this?

    Unknowing-Thorax
    There's no way to do this that I know of

    but I'm pretty sure you would never need this, it's unessecary.

    As for renaming objects, objects don't really have names- unless you did something like
    var THENAME = new thing();
    in which case you could do
    var THENEWNAME = THENAME;

      Chat