+ 1
while using multiple parameter user defined functions in javascript, how can any missing parameter be set to a default value?
While defining a user defined function in JS, we can use multiple parameters while declaring. While calling the function, if any one of the parameters are missing, how can I define a default value to the function so that it will not show an error for missing parameter?
1 Respuesta
+ 2
function sup (myparam = theValue){
}