function default if no value is passed in javascript 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