Search:

Type: Posts; User: samfin

Search: Search took 0.23 seconds.

  1. Replies
    4
    Views
    1,460

    Re: Finding the smallest element and shifting....

    That looks about right, you're just missing a closing bracket for the for loop in the min method, this needs to go before the return statement. That should get rid of those errors.
  2. Replies
    4
    Views
    1,460

    Re: Finding the smallest element and shifting....

    Your min method is more or less right. This line you've but index twice and then i for the last

    for (index = 1; index < numbers.length; i++)

    Change these all to i.
    You've also not returned min...
Results 1 to 2 of 2