Re-creating the Lodash Library

Hi,

I am re-creating the Lodash Library.
https://www.codecademy.com/paths/web-development/tracks/web-dev-js-arrays-loops-objects/modules/pjs-javascript-capstone/projects/lodash

But now I’m stuck at step 9 Implement inRange().
If I type

if(start > end){
      var temp = end

Al the curly brackets turn red. And (because of that) I can’t test InRange() at step 10.
I tried this course on my own computer in VS Code, But the terminal doesn’t seem to work.
What am I doing wrong?

Try ending you statements with ;. Just a guess though :sweat_smile:

Thanks! That is better, but the test is failing. In the get help video the webdeveloper is leaving the ; out. :blush:

hi!
i’m having trouble in the inRange tests too! I even tried to copy the exact same code from the get help video and it still fails the test :thinking:

here is my code:
Capturar

and, i dont get it, it still fails in almost all tests!

I just copied the code you wrote and everything passes.

inRange(number, start, end) {
        if (end === undefined) {
            end = start;
            start = 0;
        }
        if (start > end) {
            let transfer = end;
            end = start;
            start = transfer;
        }
        let isInRange = start <= number && number < end;
        return isInRange
    }

Which tests are failing?