JavaScript · Middle · Question 68 of 75

What does config.timeout ??= 5000 do?

Explanation

Logical assignment operators ??=, ||= and &&= assign only when needed. ||= would overwrite a legitimate 0 timeout.

Further reading

Problem with a question

JavaScript · Middle · question 68

Test yourself

Take the JavaScript · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz