Skip to content

marta-pylypchuk/codewars-highest-and-lowest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

In this assignment we are given a String of space separated numbers, and have to return the highest and lowest numbers.

Examples:
highAndLow("1 2 3 4 5") // return "5 1"
highAndLow("1 2 -3 4 5") // return "5 -3"
highAndLow("1 9 3 4 -5") // return "9 -5"

Output String must be two numbers separated by a single space, and highest number is first.