I want to pass an object or array to a function, make it undefined, and see the changes after the function execution ends.
var arr = ['aaa', 'bbb', 'ccc'];
var reset = function (param) {
   param[0] = 'bbb';
   param = undefined;
}
reset(arr);
All right, so the result is ['bbb', 'bbb', 'ccc'], but I want it to be undefined. Is it possible to do this efficiently?
 
     
    