Simon Willison’s Weblog

Subscribe

Tuesday, 13th November 2007

JavaScript Method Overloading. John Resig shows a clever trick for overloading JavaScript methods based on the number of arguments, using the little-known .length property of a JavaScript function object.

# 2:39 pm / javascript, john-resig, methodoverloading

2007 » November

MTWTFSS
   1234
567891011
12131415161718
19202122232425
2627282930