Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

2017 Year of Programming

Challenge_6

Ranges

Synopsis

Takes a user defined string of numbers and splits it to an array, then outputs the ranges of any consecutive entries. ie:

Input: [1,2,3,4,8,9,10,12,13,14]

Output: ["1->4", "9->10"]

It is assumed the numbers are sorted by the user.

Instructions

Open index.html in any browser. Enter a string of numbers in ascending order, separated by comma's or spaces. Click submit, and the ranges will be printed underneath.

Contact

Chris -- zirhc86@gmail.com

https://github.com/Zirhc86