It selects all the <td> nodes that are children of the parent <tr> node. D3 returns this as an array object ie selectAll() returns an array containing an array of <td> nodes as objects, and you can call another d3 function for each object. In addition, a good way to understand what is happening behind the scenes is to use the Chrome developer tools and execute some code in the console.
Example: let's say you have this table:
<table> <tr> <td></td> <td></td> <td></td> </tr> </table>
If you run d3.selectAll("td") in the console, the result will be:
[Array[3]] // A two dimensional array that contains 3 of the "td" nodes, each of of which is an object. >0: td // A D3 selection object. >1: td >2: td length: 3 parentNode: document __proto__: Array[0]
source share