Create a Linear Scale with D3

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

    // 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"body")

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0.

Link to the challenge:

scaleLinear is a method and to call it you must put () after it.


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:

ƒ vu(){var t=pu(su,an);return t.copy=function(){return hu(t,vu())},du(t)}
ƒ r(n){return(o||(o=i(a,c,f?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}(t):t,s)))(+n)}

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