0 votes
59 views
asked in java script by (1.4k points)

I have a function which you can pass an object to. I then need all the vars within this object to become local variables. For instance

1 Answer

0 votes
answered by

Simply do

function ping(obj){
    return obj.riff;
}

or

function ping(obj){
    var riff = obj.riff;

    return riff;
}

Categories

...