Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Are parameters optional in JS ? 1

Status
Not open for further replies.

neillovell

Programmer
Aug 27, 2002
560
0
0
GB
I have a function with two parameters, but it is sometimes called with two, one, or no parameter at all! In the event of not enough parameters being passed, are the ones asked for being set to null ?
 
Yes. They are set to null. You can chekc that by checking if the variable = null (a==null)..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top