score:1

Accepted answer

The "equivalent" is:

console.log(d3.select("line").node())

Given this simple snippet:

<svg width="100" height="100">
    <circle cx="40" cy="40" r="20" fill="teal"></circle>
</svg>

var circle = d3.select("circle");
console.log(circle.node());
console.log(circle);

console.log(circle.node()) gives you:

<circle cx="40" cy="40" r="20" fill="teal"></circle>

While console.log(circle) gives you:

zi {_groups: Array[1], _parents: Array[1]}

Note: I put quotes in "equivalent" because this depends on many things. So, that's the equivalent for your specific question.


Related Query

More Query from same tag