I’m in the process of working through the Lodash project (Linked HERE) and keep getting an error in testing due to a Syntax error with inRange (the section in italic/bold in code below). Is there something I’m missing in terms of a bracket, semicolon or otherwise? My code so far is below:
const _ = {
clamp(number, lower, upper){
var lowerClampedValue = Math.max(number,lower);
var clampedValue = Math.min(lowerClampedValue, upper);
return clampedValue;
}
inRange(number, start, end){
if (end === undefined){
end = start
start = 0
} if (start > end) {
var temp = end
end = start
start = temp
}
var isInRange = start <= number && number < end
return isInRange
}
words(string){
var words = string.split(’ ');
return words;
}
};
// Do not write or modify code below this line.
module.exports = _;