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
Arrow function is syntax for creating function.
I have put underscore there bcs. I know I will not use this param in this function, but I need to use second param.
what does that arrow function syntax mean. I think i is the currentVal parameter but I don't understand the underscore bit
I think they divided by 2 because the smallest divisor you can have is 2 or above meaning all numbers will be less than x/2 and flooring it was because divisors are only full numbers. The question mark is an if statement. First you have your statement then the question mark then the code to be ran if true and the colon is an else followed by the code for the else
300027 should definitely be false because it's only 729 + 64 + 117649, so it's quite deficient.
If you post your solution here and mark it as a spoiler, I'll take a look.
My code works perfectly accorind to what the instructions say, but it says that 300027 should be false while 7 ^ 6 alone is 6 digits long, and the other numbers aren't enough to increase another a digit and I did the math myself but still I get an error
I don't get it. Could you please rephrase that?
yeah, the list would be handeled as pne element so you wouldn't have to do "*n" plus you can make it a string
Look at the comments below.
wouldn't that mean that a list won't work, and they have to be inserted as seperate variables