Lodash.js (Clamp) Hit a Brick Wall

Hi,

Really struggling and very frustrated. I have watched the tutorial over and over again and copied the code word for word. Yet I still get an error message in the terminal. My code is as follows:

const _ = {
  clamp(number, lower, upper) {
    var lowerClampedValue = Math.max(number, lower);
    var clampedValue = Math.min(lowerClampedValue, upper);
    return clampedValue
  }
};

Why is this not working? Please no riddles, or clues or games. I just want to know the reason why this is failing multiple times over and over again.

I appreciate any help anyone can give on this question and apologies if this has been answered many time previously. I am just at my wits end right now with this challenge.

1 Like

Please include a link to the exercise page so we can follow up with your question.

1 Like

Lodash Challenge

Appreciate any help possible and thanks for taking the time to look over problem

2 Likes

Also, please post the error message. Sorry for the bother.

1 Like

- This is what I see on my screen and it’s no bother at all!

1 Like

I don’t see anything amiss in your code, so plugged it into my _ object and all tests pass.

Dumb question… Did you Save it before running the test?

1 Like

There’s a strong chance I didn’t save it. I’m based in UK and it’s late here right now so will try tomorrow with a fresh head.

Thanks for taking a look

2 Likes

i totally had the same issue, just needed to save the file first :roll_eyes: :rofl: :rofl:
thanks for the thread