Essential JavaScript
Introduction
JavaScript Basics
Numbers
Strings
Logic
Variables
Loops
Objects
Arrays
Arrays Intro
Making Arrays
Array Builder Kata
Array Elements
Human Names Kata
Array Length
Longest Array Kata
Looping Over Arrays
Highest Number Kata
Word Hunter Kata
Array Average Kata
Min-Max Kata
Adding Elements
Number Range Kata
Removing Elements
Arrays of Objects
Biggest Animal Kata
Arrays of Arrays
Taboo Words Kata
Going Further
Essential JavaScript
Introduction
JavaScript Basics
Numbers
Strings
Logic
Variables
Loops
Objects
Arrays
Arrays Intro
Making Arrays
Array Builder Kata
Array Elements
Human Names Kata
Array Length
Longest Array Kata
Looping Over Arrays
Highest Number Kata
Word Hunter Kata
Array Average Kata
Min-Max Kata
Adding Elements
Number Range Kata
Removing Elements
Arrays of Objects
Biggest Animal Kata
Arrays of Arrays
Taboo Words Kata
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