method parameters js code example
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) {
}