May 09, 2021 CoffeeScript
You want to initialize an object literally, but if the object already exists, you don't want to rewrite it.
Use the existing judgment operator.
window.MY_NAMESPACE ?= {}
This line of code is equivalent to the JavaScript code below:
window.MY_NAMESPACE = window.MY_NAMESPACE || {};
This is a common trick in JavaScript to define namespaces using object literal values. This avoids overrideing a namespace that already exists by determining whether a namespace with the same name exists before it is created.