Essential JavaScript

Going Further

In Range Kata

Determine if a number is between a given minimum (min) and maximum (max) number.

The range is inclusive, so if number is equal to either min or max, it is considered to be within the range.

All arguments - number, min, and max - can be positive or negative.

You can expect min to always be less than max.

Return true if the number is in range and false otherwise.

Example:

isNumberInRange(1, 1, 10); // true isNumberInRange(1, 2, 3); // false isNumberInRange(1, -2, 1); // true

Code Editor

Click "Run Tests" to execute your function and see the test results below.

Test Results

Run your code to see test results

Console Output

// Console output will appear here...

0 output lines