You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have the binary :: operator, as in Function::toString. I propose adding a prefixed unary version that behaves as if the binary operator's left operand was Object. This would make common tasks such as Object::hasOwnProperty (::hasOwnProperty) and Object::toString (::toString) shorter.
The text was updated successfully, but these errors were encountered:
Nice idea, but I think it's too ambiguous. If I were looking at:
::toString
And I had never seen it before, besides looking like a typo, I'd assume that it referred to the prototype of the global object: window.prototype.toString.
We have the binary
::
operator, as inFunction::toString
. I propose adding a prefixed unary version that behaves as if the binary operator's left operand wasObject
. This would make common tasks such asObject::hasOwnProperty
(::hasOwnProperty
) andObject::toString
(::toString
) shorter.The text was updated successfully, but these errors were encountered: