modified description
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
Checks if the given number falls in the given range.
|
||||
|
||||
`end` is an optional parameter. If `end` is not given, the range is considered from 0 to start.
|
||||
`end` is an optional parameter. If `end` is not given, the range is considered from `0` to `start`.
|
||||
|
||||
```js
|
||||
const inRange = (n, start, end=null) => (end == null) ? (n>=0 && n<=start) : (n>=start && n<=end);
|
||||
|
||||
Reference in New Issue
Block a user