How to convert sequence of numbers in an array to range of numbers

Posted by gokul on Stack Overflow See other posts from Stack Overflow or by gokul
Published on 2010-02-16T05:41:21Z Indexed on 2010/03/30 2:43 UTC
Read the original article Hit count: 570

Filed under:
|
|
|

In javascript how to convert sequence of numbers in an array to range of numbers?

eg. [2,3,4,5,10,18,19,20] to [2-5,10,18-20]

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about conversion