Skip to content

2 functions check if array of numbers is in ascending numeric order or not

License

Notifications You must be signed in to change notification settings

writetome51/in-numeric-order

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inNumericOrder(numbers): boolean

If numbers are in ascending order, returns true.
Each item in numbers must be of type 'number'.

Examples

inNumericOrder([1,2,3,4]); // --> true

inNumericOrder([-1.03, -1.02, 0.222, 0.223]); // --> true

inNumericOrder([-10, 5, -11]); // --> false

inNumericOrder([-10, '', -11]);
// --> Error: "Input must be a finite number of type 'number'"

Installation

npm i @writetome51/in-numeric-order

Loading

import { inNumericOrder } from '@writetome51/in-numeric-order'; 

About

2 functions check if array of numbers is in ascending numeric order or not

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published