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.
I've started from filter, but the test found it incorrect, and then I tried many methods, including endsWith, for loop, map, when I re-read the task and found out that it was saying to output even numbers, when I was trying to output odd ones. What a waste of time by me
false
,0
,""
,null
andundefined
all have the property that when used in a if statement that they will equate tofalse
. So it isn't necessary at all.As for production code, it is used without the
=== true
. Which is generally done for all if statements. We also don't write code likeThis comment is hidden because it contains spoiler information about the solution
Too much repeated code I think.