Assessment wanted for javascript functions 3 skill test

Team, Can you please assess my code for the functions 3 skill test.

Code link - https://codepen.io/Nitrathod7/pen/oNzELgO

Problem statement -
In this task, you return to the problem posed in Task 1, with the aim of improving it. The three improvements we want you to make are:

  1. Refactor the code that generates the random number into a separate function called random() , which takes as parameters two generic bounds that the random number should be between, and returns the result.
  2. Update the chooseName() function so that it makes use of the random number function, takes the array to choose from as a parameter (making it more flexible), and returns the result.
  3. Print the returned result into the paragraph ( para )'s textContent .

Try updating the live code below to recreate the finished example:

1 Like

Hello @Nitin_Rathod

the task you mentioned said that you create random function that take 2 parameters which is the bounds of numbers to get the generated number between them

and the choooseName should take parameter of type array and you will call the random function from inside choosename in that case not the oposite way

hope that help and have a nice day :slight_smile:

1 Like