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
Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
Very clever... Otherwise... VERY bad. Very very bad.
Could you explain to me (s.length / 2 - 1) ? To me it is saying find the middle and move the index down one in case it is an even number string length so you can return both numbers. I don't get it, I do understand the deprication of substr and I used substring in my solution. Or if you could maybe explain what the (s.lenght / 2) - 1 means that will help as well.
This comment is hidden because it contains spoiler information about the solution
A string also has a length property. Don't need to convert the string to an array with
split()
.This comment is hidden because it contains spoiler information about the solution
substr is deprecated
This comment is hidden because it contains spoiler information about the solution
Nothing wrong with that solution. Always good to practice the basics. Sometimes choosing to do it with a for loop is just good practice!
I was wondering how I could write a more concise arrow function for this. I'm very new to them obviously but this is great!
Good code, but unnecessarily big.
No need to use Math.ceil (if you don't use decimal numbers) and ternary operator.
Check my solution.
h2ker
ok now quit programming
This comment is hidden because it contains spoiler information about the solution
Loading more items...