I'm following melon js tutorial. This is at the top of my HUD.js file.
game.HUD = game.HUD || {}
I've seen this before in other examples. What does the namespace.something = namespace.something || {}
syntax mean and why is it needed?
I'm following melon js tutorial. This is at the top of my HUD.js file.
game.HUD = game.HUD || {}
I've seen this before in other examples. What does the namespace.something = namespace.something || {}
syntax mean and why is it needed?