in the second method of object called “inRange” in the last step inside this method i declare a variable called isInRange like this but the code don’t run right in the terminal :
// Do not write or modify code below this line.
const _ = {
clamp(number, lower, upper) {
let lowerClampedValue = Math.max(number, lower)
let clampedValue = Math.min(lowerClampedValue, upper)
return clampedValue
},
inRange (number, start, end) {
let aux = 0
if(end == undefined) {
end = start
start = 0
}
if(start > end){
aux = start
start = end
end = aux
}
let isInRange = number > start && number < end
return isInRange
}
}
console.log(_.clamp(4, 5, 6))
console.log(_.inRange(3, 7, 6))
module.exports = _;