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.
You are right away incorrectly calculating the
smallestNumber
in the//Isolating Smallest Number//
block (obviously,3
is not the smallest of[5,4,1,2,3]
). Once you fix that, look also at how you calculatesecondSmallestNumber
.This comment is hidden because it contains spoiler information about the solution
because
indexOf
is not an individually defined function... seems you might want this:numbers.indexOf(smallestNumber)
This comment is hidden because it contains spoiler information about the solution
I don't quite understand how this works. Why isn't 'numb' being overwritten every time you iterate through the for loop?