I am new to JS and I need to use an anonymous function, but when I provide default values to parameters as in named functions, I get the error "Uncaught SyntaxError: Unexpected token =".
Here's the code excerpt:
//some properties
initResize: function(isPlayerInitializing=true){
//some execution
},
//some more properties
I would like to know how one would provide default values to parameters of anonymous functions in Javascript.
Aucun commentaire:
Enregistrer un commentaire