set initial value in parameter of function code example
Example: default value of functin atribute
function say(message='Hi', number=7) {
console.log(message);
console.log(number);
}
say();
// 'Hi'
// 7
function say(message='Hi', number=7) {
console.log(message);
console.log(number);
}
say();
// 'Hi'
// 7