I am trying to understand D3 but even when following a tutorial identically it does not work..
here is the code which I told would have gave me an array of td but which instead does not give anything:
<body>
<!-- load the d3.js library -->
<script src="https://d3js.org/d3.v3.min.js"></script>
<script>
var td = d3.selectAll("tbody tr").selectAll("td");
td.style("color", function(d, i) { return i ? null : "red"; });
var len = td.lenght
console.log(td)
console.log(len)
</script>
<table>
<thead>
<tr><td> A</td><td> B</td><td> C</td><td> D</td></tr>
</thead>
<tbody>
<tr><td> 0</td><td> 1</td><td> 2</td><td> 3</td></tr>
<tr><td> 4</td><td> 5</td><td> 6</td><td> 7</td></tr>
<tr><td> 8</td><td> 9</td><td> 10</td><td> 11</td></tr>
<tr><td> 12</td><td> 13</td><td> 14</td><td> 15</td></tr>
</tbody>
</table>
</body>
neither makes anything red.. not a clue why