• ###### JakeyDonkeyBrainscommented on "Convert number to reversed array of digits" javascript solution

I had a similar function, but declared a variable first. Makes sense the whole thing could just be returned.

bammmm...

• ###### FaustoCecacommented on "Get Planet Name By ID" javascript solution

Idt that this solution fix the issue of the original function, you're creating a new one, really clever but not what the kata are looking for

• ###### SheikhElMoctarcommented on "Get Planet Name By ID" javascript solution

you're very clever :)

• ###### depressed_c0dercommented on "Get Planet Name By ID" javascript solution

Damnnn! This is cool!

вау

• ###### Chrono79commented on "Get Planet Name By ID" javascript solution

This comment is hidden because it contains spoiler information about the solution

• ###### mellyXJ9commented on "Get Planet Name By ID" javascript solution

This comment is hidden because it contains spoiler information about the solution

• ###### slaclecommented on "Convert number to reversed array of digits" javascript solution

This comment is hidden because it contains spoiler information about the solution

• ###### tomeknajcommented on "Convert number to reversed array of digits" javascript solution

This comment is hidden because it contains spoiler information about the solution

• ###### JohanWiltinkcommented on "Convert a Boolean to a String" javascript solution

This comment is hidden because it contains spoiler information about the solution

• ###### ZuraJeladze2commented on "Convert a Boolean to a String" javascript solution

Will this really work? :D

:D Bravo!

• ###### thepatrick00commented on "Get Planet Name By ID" javascript solution

This comment is hidden because it contains spoiler information about the solution

• ###### prottocommented on "Exclusive "or" (xor) Logical Operator" javascript solution

!! 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)