parameter example js
Example 1: parameters in javascript
function myFunction(x, y) {
if (y === undefined) {
y = 2;
}
}
Example 2: how to create a function with parameters in JavaScript
function name(param, param2, param3) {
}
function myFunction(x, y) {
if (y === undefined) {
y = 2;
}
}
function name(param, param2, param3) {
}