I've been exploring examples on bl.ocks.org in an effort to learn D3 and keep coming across this +
notation below. Google searches have been unfruitful in explaining what it is used for, I assume because I'm still learning the D3 and Javascript jargon.
What does the +
do in the code snippet below? This code is from this bl.ocks example.
var svg = d3.select("svg"),
margin = {top: 20, right: 20, bottom: 30, left: 40},
width = +svg.attr("width") - margin.left - margin.right,
height = +svg.attr("height") - margin.top - margin.bottom;