function callIt(func) {
func();
}
Which of the following expressions throw exceptions?
new
function newIt(constr) {
new constr();
}
Which of the following expressions throw exceptions?
function foo(x=true, y) {
return [x, y];
}
const result = foo('a', 'b', 'c');
What happens?
function foo(x=true, y) {
return [x, y];
}
const result = foo('a', 'b');
What happens?
function foo(x=true, y) {
return [x, y];
}
const result = foo('a');
What happens?
function foo(x=true, y) {
return [x, y];
}
const result = foo();
What happens?
function f(x, ...y) {
return [x, y];
}
const result = f('a', 'b', 'c');
What happens?
function f(x, ...y) {
return [x, y];
}
const result = f();
What happens?
Which of the following expressions are syntactically correct?