mattbasta mattbasta - 6 months ago 50
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.


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: