I want to be able to do this in JavaScript:
function myFunction(one, two = 1) {
// code
}
myFunction("foo", "2");
myFunction("bar");
I tried this and it doesn't work. I don't know how to call this type of parameters, could somebody point me in the right direction?
Thanks.