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.
This comment is hidden because it contains spoiler information about the solution
I think doing that is highly resource hungry and should be avoided
!! is used to convert a truthy/falsy value to its boolean equivalent.
let num = 5; (truthy)
!num // false
!!num // true
let num = 0; (falsy)
!num // true
!!num // false
comparing 5 with !!5 would be the equivalent of comparing 5 with true (which is false)
5 === !!5
5 === true
The only reason people still use it over Boolean (other than wanting to look like elite hackers) is because it's something like 10-15% faster (last time I checked)
If you mean the sample tests, you need to write your own, otherwise, click Attempt directly.
yea, you can have as many as you want, tho it becames quite unreadable after a certain depth...
That's not a ternary, those are two.