Question: What is output to the console? function getSum(scores) { } if (!Array.isArray(scores)) { } throw new TypeError(Array error); if (scores.length != 2) { }
What is output to the console? function getSum(scores) { } if (!Array.isArray(scores)) { } throw new TypeError("Array error"); if (scores.length != 2) { } throw new RangeError("Length error"); return scores [0] + scores [1]; try { } let sum = getSum([50, 60, 70]); console.log(sum); catch (ex) { console.log(ex.message); }.
Step by Step Solution
There are 3 Steps involved in it
Answer The given code snippet is incorrectly structured It appears to be a mix of a function definit... View full answer
Get step-by-step solutions from verified subject matter experts
