 var obj = {

The colon is used as part of the conditional operator in C and many other languages.C++ uses a double colon as the scope resolution operator, and class member access.Most other languages use a period but C++ had to use this for compatibility with C.

Erlang uses a single colon for scope resolution.