Default values for function args in JS

It looks like JS has no default values for functions arguments. Of course there are some workarounds. Like http://web-graphics.com/mtarchive/001709.php or http://www.vivabit.com/bollocks/2006/01/09/cheeky-tip-default-function-arguments-in-javascript

The second one has nicer look, at least IMO.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.