What if a tooltip expects a position flag, but receives an answer flag whose value is also "right"? The function can mistake one identifier for the other. A namespace collision occurs when distinct names or values are confused; JavaScript Symbols can provide unique flags. section 13.1
Listing 13.1. Using constants as flags
The answer and position objects use string values, so passing answer.CORRECT matches positions.RIGHT and selects the right-side case instead of reporting an error. section 13.1
Give each flag a unique Symbol
Set positions.RIGHT to Symbol('right'). Calling Symbol('right') again creates a different symbol, so a flag from another set will not match it merely because the descriptions are the same. section 13.1


