Turn arguments object into array

by ocorpening

JavaScript

function tom(f, g, h)
{
    // turn arguments into array using slice
    var alfred = [].slice.call(arguments);
    console.log(alfred);  // ["a", "b", "c"]
}
tom("a", "b", "c");