Closed kikorb closed 7 years ago
The example was wrong. It stated that ?= is similar to JS || when the || will affect not only not defined scenario but also any falsy values (values that evaluate as false)
There are way too many differences between the 2:
window.var ?= 'something' console.log(window.var) ->
window.var ||= 'something' console.log(window.var) ->
The example was wrong. It stated that ?= is similar to JS || when the || will affect not only not defined scenario but also any falsy values (values that evaluate as false)
There are way too many differences between the 2:
window.var ?= 'something' console.log(window.var) ->
window.var ||= 'something' console.log(window.var) ->