Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

optional function parameter javascript

function check(a, b = 0) {
  document.write("Value of a is: " + a + 
                 " Value of b is: " + b + 
                 "<br>");
}
check(9, 10);
check(1);
 
PREVIOUS NEXT
Tagged: #optional #function #parameter #javascript
ADD COMMENT
Topic
Name
1+6 =