Tell us what’s happening:
I am having trouble with this " The output variable should call scale with an argument of 50. "
Your code so far
<body>
<script>
// Add your code below this line
const scale = d3.scaleLinear // Create the scale here
const output = scale(50); // Call the scale with an argument here
// Add your code above this line
d3.select("body")
.append("h2")
.text(output);
</script>
</body>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0.
I actually had the same question. Since we store an expression in a variable, we should not invoke it beforehand, but rather use the invocation (parenthesis) when we call the stored expression from the variable.
I wanted to see what d3.scaleLinear and d3.scaleLinear() would log in the Chrome console and here’s what I got:
I dont have a big experience with ES6, but it seems that the scaleLinear method nests a vu() method, which must be invoked first. Idk why, anyone who has more experience on the topic is welcome to give feedback