DOM manipulation with D3.js (Compare with Vanilla JS)