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
this works, but nicer is using ES6 default parameters https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Default_parameters
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 works, but much nicer in ES6 is to use default parameters https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Default_parameters
You shouldn't need to do this.species = ..., this.legs = ... etc in the Shark, Dog and Cat Classes. By calling super the parent class (Animal) is setting these properties for you.
Its a typo, english is not his first language. He's my student.
I want you to spend a little more time deciding on how to name things. Also your indentation/code formatting could be much better! These things are important
nice solution!
You know the last 3 lines could just be summarized into
return [res2, res1];
Also indent your code!!!!
Anything that increments the number and checks if its a palindrom will be hopelessly inefficient for cases such as n = 9999999900000000 . Theres a O(1) solution that is clearly best.
Doesn't do any palindrome checks, doesn't do any searching.