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.
unreadable ninja code.
as always on codewars
See my solution. I think it will be more correct.
Same, i mean for this kata its ok, but i dont think its a good practice
It's a spread syntax, than allowed us to find max age in array of age.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax
This comment is hidden because it contains spoiler information about the solution
If you do it like that, won't it do the divison in every iteration? On top of that, it divides before adding
ageSum
.Agree
^Excuse me, but how do you see the solution from the author?
It's possible to solve this with a single iteration of the list
Nice One!!
There is no definition of "teen" in kata description. This term differs from country to country and by analogy with other groups, it is logical to assume that in this case it is from 10 to 19 years, inclusive.
In addition, after solving the kata, you can see the solution of the author, from which it also follows that 10 <= 'teens' <20.
This is not a correct answer as it doesn't return false for ages 10,11 and 12. The question asks for teens and up.