when a function has two option parameter how to set value to second optional parameter in javascript code example
Example: javascript optional parameters
const myFunction = (str, id=0) => {
console.log(str, id)
}
myFunction("Hello Grepper")
// OUTPUT : "Hello Grepper 0"
myFunction("HG", 10)
// OUTPUT : "HG 10"