FrontendInterviews.dev

625. call vs apply Argument Passing

Easy•

Predict the output.

function sum(a, b) { return a + b }
console.log(sum.call(null, [1, 2]))

What is the correct output/behavior?

Select an option and submit your answer.
Next Problem