JSFiddle - React, Tailwind, and code Playground
by mamounothman
JavaScript
var svg = d3.select("body")
.append("svg")
.attr("width", 500)
.attr("height", 500);
var g = svg.append('g');
g.append('rect').attr('type',1)
.attr("width", 400)
.attr("height", 200);
g.append('rect').attr('type',3)
.attr("width", 300)
.attr("height", 280);
console.log(g.attr('width'));
console.log(g.attr('height'));