(Not snarky - I don't know JS)
Those values are usually in variables that and have been set maybe from a backend reply or from the UI at some point.
That is just one instance of the sloppy mess of weak typing. Instead of writing a long list of it I just used an example to illustrate.
(Not snarky - I don't know JS)