Skipping arguments in JavaScript

Posted by hekevintran on Stack Overflow See other posts from Stack Overflow or by hekevintran
Published on 2010-03-28T07:00:13Z Indexed on 2010/03/28 7:03 UTC
Read the original article Hit count: 214

Filed under:
function my_func(a, b){
    if(typeof(a) !== 'undefined'){
        // do stuff
    }

    return b;
}

How can I call this function will only the second argument? In other words, I want a to be undefined.

© Stack Overflow or respective owner

Related posts about JavaScript