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.
yep most teams in my experience default to using them, and it's not a bad choice. know the rules so you can break them. again it's a stylist choice.
eslint: "always" (default) requires semicolons at the end of statements
https://eslint.org/docs/latest/rules/semi
A stylistic choice. JS doesn't require semi-colons, the interpreter automatically adds them.
https://www.freecodecamp.org/news/lets-talk-about-semicolons-in-javascript-f1fe08ab4e53/
Why you skip ';' in the end return statement?
Because of that.
This comment is hidden because it contains spoiler information about the solution
Thank you :)
I like Number() better, it's clearer and easier to read
Which do you think is better?
Number()
orparseInt()
I like the solution.
This comment is hidden because it contains spoiler information about the solution
I agree as this kata https://www.codewars.com/kata/595a4838d41def8ef2000017 is identical to this kata but the solution I wrote for that kata doesn't work for this one.
Added.
So is
[3, 2, 1]
not a sorted list?nice idea for a kata. although as se77enn mentions, some of the tests arn't binary search trees by definition which leads to correct solutions not being able to pass
Loading more items...