If you put on the console smth like a: "Hi"
it does not show any error but it prints the value. But when you put a
, it says that the variable does not exist. So, why is that? I know colons are used for defining properties inside a json object, but why is that example does not throw an error from the begging.
EDIT : I am looking for the use of colons out of a json object. Not in a switch
statement either.