What does ‘::’ (double colon) do in JavaScript?

It was certainly not the case at the time of your question, but right now :: is a valid ES7 operator. It’s actually a shortcut for bind.

::foo.bar

is equivalent to

foo.bar.bind(foo)

See an explanation here for examples:

Leave a Comment