FrontendInterviews.dev

626. Default Parameter Scope Order

Easy•

Predict the behavior.

function f(a = b, b = 1) {
  return a + b
}
console.log(f())

What is the correct output/behavior?

Select an option and submit your answer.
Next Problem