mattbasta mattbasta - 1 year ago 125
Javascript Question

What is the double-dot operator (..) in Javascript?

I'm doing some work with the Parser API in Spidermonkey. The docs show that there's a binary operator

. Anybody have any idea what this is/does? I'd love to know. I've never seen it before. If I were forced to guess, I'd have to say it's something with E4X, but that's only because I know nothing about E4X.

Answer Source

It is an E4X operator.


While the . operator accesses direct children of the given node, the .. operator accesses all children no matter how deeply nested:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download