Passing Arguments to a JavaScript Function

by on Jun.22, 2005, under Tech Tips

Have you ever been writing a function and realised you don’t want a fixed number of parameters then this page is for you
Passing Arguments to a JavaScript Function

It describes using the arguments property of the function you are writing and gives a simple example of how to use them.

I used this method to create a function similar to c’s printf function that allowed me to pass a string with placeholders in it and replace them with the parameters I passed.


Comments are closed.