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
No, it does not. In the newest browsers versions, radix is set to
10
by default. See: https://stackoverflow.com/a/58311034/17799125Need Radix
doesnt metter
thank you
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 comment is hidden because it contains spoiler information about the solution
i was close to this haha...good work!
best idea
Can think of it like this:
first, we set up way to handle all undefined cases
we'll be able to check and handle all other cases by combining the loop and if conditional
we can use guarded clause if that'll run only if the for loop doesn't return earlier
we put return undefined at the end of the code block
we know we need to return the value that is sequenced after the item
we can combine loop and conditional variable for COMBINED SET UP
when loop finds what it needs to find, we can tell it to modify variable outside of loop body
which means the next iteration runs
and that iteration - it contains the next value, which is what we're looking for
and then and there - we can use the changed variable outside of the loop function
and when that variable it's true and only then
we can just return that value, as it's the value right after the previous value
and the previous value was a match, equal to item
so if we return the value from the iteration that is right after that iteration that found the match
that'll always be the value we're looking for, given the problem specification
we need a loop that can iterate over any iterable, not just array
for...of... does that
now, in each iteration, we're getting the value
we check it against the item
if it is the item
It's probably best to go at these one at a time, and really get each item more deeply in a successive progression.
If you didn't know any of this - and never saw the solution before - what would make solving it that way a 100x easier, is more or less:
welp i learn't something today.
Thank you!
This comment is hidden because it contains spoiler information about the solution
What is this form of comparison called, im trying to learn it but i am not sure what it is named.
Loading more items...