d3 js download code example
Example: d3 js
// conventional method of selecting all paragraphs
//and changing their color property to blue
var paragraphs = document.getElementsByTagName("p");
for (var i = 0; i < paragraphs.length; i++) {
var paragraph = paragraphs.item(i);
paragraph.style.setProperty("color", "blue", null);
}
//D3 way of doing the same
d3.selectAll("p").style("color", "blue");