FrontendInterviews.dev

692. Logical OR Assignment

Easy•

Predict the output.

let x = 0
x ||= 5
console.log(x)

What is printed in the console?

Select an option and submit your answer.
Next Problem