Quick blog post today that I’m writing during work on how to pass an array of arguments in JavaScript. This is something that I actually need to do today and well… I didn’t know how to do it 5 minutes ago! So without further ado… here’s how:
You can use JavaScript’s built-in Function.prototype.apply() method to pass an array of arguments. If you need to do this, check out this example–
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters