Re-creating lodash library - inRange()


When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

Hi there, I’m stuck. I’m trying to find the right solution but I always fail the number 3 and number 4.

This is the link to my project:

Any help will be very appreciate!

Lodash project: question 19

The problem is in your boolean expression.

Read the instructions again:

set it equal to a boolean expression that checks if start is smaller than or equal to number AND if number is smaller than end .

(emphasis mine)


const isInRange = start <= number && number < end;

Also, your last if-statement is not needed.
The boolean expression will either be true or false.
You can return isInRange immediately.


return isInRange;