¡GoConqr estrena diseño! Cuéntanos qué te parece.

Módulo 6 de 10 · Multimedia

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. 

Instrucciones

Para avanzar en el curso, envía un intento de este test. Puedes enviarlo después de la última pregunta.

Ir al módulo elegido

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?