Tuesday 22 March 2016

Is JavaScript support default parameters in its functions?

I want to make default parameter in javascript , so can i ?



jm.toInt = function (num, base=10) {

return parseInt(num,base);
}

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...