I need to have a constant variable, one that can't be changed. in my javascript scripts...

Code:
const USER_ID = 10;
this works, but when I attempt to access the constant through a function, then the scope of the constant doesn't seem to extend to functions.

How do I make the constant global to all functions?