Home
<!doctype html> <html> <head> <script src="https://d3js.org/d3.v4.min.js"></script> </head> <body> <p>D3 Tutorials</p> <p></p> <p></p> <script> var myData = ["Hello World!"]; var p = d3.select("body") .selectAll("p") .data(myData) .text(function (d, i) { return d; }) .exit() .remove(); </script> </body> </html>
Result: