JavaScript - Optional named function arguments

by Subramanian 2012-09-14 12:19:58

function foo({ name:name, projectRazz
roject}) {

Print( project );
Print( name );
}

foo({ name:'soubok', project:'jslibs' })
foo({ project:'jslibs', name:'soubok'})
895
like
0
dislike
0
mail
flag

You must LOGIN to add comments