arrange-of-numbers
v1.0.1
Published
To arrange numbers from largest to smallest and smallest to largest in the array
Downloads
4
Maintainers
Readme
What is this?
To arrange numbers from largest to smallest and smallest to largest in the array
Installation
npm i ArrangeNum
How to use
ArrangeNum.formSmallToBig(Array Numbers
)
ArrangeNum.formBigToSmall(Array Numbers
)
Example
For arranged from smallest to largest
const ArrangeNum = require("arrange-of-numbers");
console.log(ArrangeNum.formSmallToBig([5,10,7,2,4,3,6,1,8,9]));
Will return Like [1,2,3,4,5,6,7,8,9,10]
For arranged from largest to smallest
const ArrangeNum = require("arrange-of-numbers");
console.log(ArrangeNum.formBigToSmall([5,10,7,2,4,3,6,1,8,9]));
Will return Like [10,9,8,7,6,5,4,3,2,1]
Copyright
All Copyrights© Reserved.