Hi,
Having some issue writing d3 arrays to html paragraph.
How should I write it so that it is correctly understood by the browser.
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js"></script>
</head>
<body>
<p id="b"></p>
<p id="c"></p>
<p id="theData"></p>
</body>
<script>
var theData, b, c = [[1, 2, 3],["L"]];
var d = d3.json(
"https://raw.githubusercontent.com/FreeCodeCamp/ProjectReferenceData/master/GDP-data.json"
).then((d) => {
theData = d.data;
b = [[1, 2], [2, 3]];
console.log(theData[0]);
console.log(b[0]);
})
document.getElementById("c").innerHTML = "Print 'c' value must be first: " + c;
document.getElementById("b").innerHTML = "Print 'b' value mut be second : " + b;
document.getElementById("theData").innerHTML = "Try print 'theData' one of two demession array:" + theData[0];
</script>
</html>