Libraries Unit 7

Is there a better way to write this without using the string of 9’s?
image

Set the first number in the list as minNumber and start the loop from index 1.

var minNumber = list[0];
for (var i = 1; i < list.length; i++) ...

Thank you!! I appreciate the help.


HI!! Can you assist me again? For this one, the student wants to make the list reusable in a library…and then print the sentence in console log. I don’t think ‘example’ can be use in the first line…correct?

Any list that the library function needs should be passed in as a parameter.

1 Like