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.
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.
Chris -- zirhc86@gmail.com