LoDash project - inRange section

Hi. When I run the test for the inRange method it tells me the inRange method was not propery defined, but I can’t see what is wrong as I defined it in the same way I did the orevious clamp method, which passed this test. Here is my code. Can anyone see what is wrong?

inRange (number, start, end) {
if (typeof end === undefined) {
end = start;
start = 0;
};

if (start > end) {
  tempVal = end;
  end = start;
  start = tempVal;
};

return number >= start && number <= end;

},

Forget this - I don’t think I saved my code before testing, passes test now.

2 Likes