3 ms·
right, but say you had an `var array = ['bacon', 'eggs']`. You can call a function with these arguments with `fn.apply(null, array)` (yeah it's ugly but it's h
by jayferd 15y ago
right, but say you had an `var array = ['bacon', 'eggs']`. You can call a function with these arguments with `fn.apply(null, array)` (yeah it's ugly but it's how it's done in JS). This doesn't work with the `new` keyword.
EDIT: also, a class method would hurt your script's minifier performance. ...and at that point you may as well just call the function anyways :)