GoConqr has a new look! Let us know what you think.

Module 6 of 10 · Media

Find biggest and smallest number in an array of strings

Kostas Diakogiannis

Find biggest and smallest number in an array of strings

M-2 Find the biggest Number in an Array of Strings

An error has occurred and you have found yourself with data of 10 students result tests that are of string data type.

So the results you have is a list of : ['63', '55.5', '72', '77',  '35.5', '81', '95', '29.5', '44.5',  '80']

Find the biggest and the smallest result in this list and print the margin between them by printing the absolute value of the difference between them. 

Hint; Find a way to to convert each string into a number, or float.

Check again parseFloat and parseInt functions to help yourself.

Hint: Use the Math.max and Math.min methods and pass the spread version of the array as an argument.

Either way, round the floated numbers into the biggest nearest integer. You may have learned some functions in the previous lectures  that could be helpful. 

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?