Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Probably a CodeWars issue then, not a kata issue.
Furthermore, var is getting replaced by the the use of let and const in ES7.
So it's a good practice i guess
let is identical to var.
The only difference is,
var is scoped to the 'nearest function block' and let is scoped to the 'nearest enclosing block'
for eg. let is only visible in the for() loop and var is visible to the whole function.
Refresh and resubmit; I tried your solution and it worked for me.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It doesn't matter. However,
var
is a really awkward legacy of JS and there's probably no reason to use it these days.Nice approach! I'm wondering why you are using let rather than var here? Does scoping matter in this case?