Alex Lang1,110 Points
Help me understand this a bit better?
Okay so in this code why can't you call it using the ().
for example like this: return year();
Zach Swift17,972 Points
When you create a new date and call the
getFullYear method, it returns a number (like
2018). That is what you're storing in your
year variable. The open and close parentheses are for calling functions. Since the
year variable is just holding a number, there is no reason to call it like a function.
Steven Parker173,644 Points
The name "year" in this challenge is a scalar variable, not a function. You are correct that parentheses are added to a function name to call it, but that does not apply to variables that represent values. Those variables are not called, they represent the value assigned to them by their name alone.