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 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)
Thanks, I did mine like this and wasn't sure about it.
This comment is hidden because it contains spoiler information about the solution
If you mean the sample tests, you need to write your own, otherwise, click Attempt directly.
I looked at the solution and when I copied and pasted this-it didn't work for me.
I have no idea why not.
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
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
This comment is hidden because it contains spoiler information about the solution
uh, huh huh...wut?
This comment is hidden because it contains spoiler information about the solution
Loading more items...