Assessment wanted for Functions 3 skill test//

Hello. If someone could see if it the code is good I would be grateful. TY.

Hello @brusli

you doing great just some notice here :

  1. for the random function i see you try to make it work in case num1 > num2 or the opposite
    but there issue here
    Math.floor(Math.random()*((num1 - num2)*-1));
    this would give you random number from 0 to num1-num2 but the function should be general so it should return random number from num1 to num2
    fix the other case when num2>num1 also
  2. this also not right random(5,10)
    you should get random number starting from 0 (the first index of the array) to the last index

hope that help and have a nice day :slight_smile:

2 Likes