The challenge requires you to initialize a variable however it forces you to use var, rather than let or const.
N/A

It is looking for a specific solution that uses the var keyword.
"tests": [
"assert(code.match(/var.*?total\\s*=\\s*0.*?;/), 'message: <code>total</code> should be declared and initialized to 0');"
]
As a side note, a lot of the beginning javascript challenges force you to use var. I am pretty sure this is by design.
In many other begineer challenges I can use let or const without fail - I don't think users should be overly limited in how they can solve a challenge.
I think I incline towards adding support for let. But it doesn't have to be explicit or obvious, even in the test message. As long as we can keep that I am okay to update the tests.
I think fcc should not only start supporting but also encourage using ES6 already. Furthermore, arrow functions also somehow buggy. I have encountered a problem while solving basic js tasks, where the same function written as an arrow function provides a different result than conventional function declaration. I have tested this on VScode and it was functioning normally.
Anyways too much off topic here. like I said it would be nice if fcc would already encourage using ES6 OR at least have a separate module to for teaching ES6 basics and new syntax.
Hi guys, can i tackle this one?
@sINFmaduft Sure you can take it on.
@Asjas Ok, do i have to mark it somehow?
@Clarke92 Sorry I am not sure what you are talking about? What are you trying to mark?
@sINFmaduft @nsuchy did either of you get around to updating the tests for this challenge to allow for ES6 syntax?
Hi, I have opened a pull request that updates the tests to fix this issue.
Most helpful comment
I think I incline towards adding support for
let. But it doesn't have to be explicit or obvious, even in the test message. As long as we can keep that I am okay to update the tests.