I came across this project lodash somehow and I was wondering what the point of it is?

I was reading the instructions and I’m not sure when I’m suppose to start coding but I started during step 3 already and here’s what I got

```
const _ = {
clamp(number, lowBound, upperBound) {
// // my solution for readability
// if (number < lowBound) {
// return lowBound;
// } else if (number > upperBound) {
// return upperBound;
// } else if (number > lowBound && number < upperBound) {
// return number;
// }
// // my solution for clean code
// return (number < lowBound) ? lowBound : (number > upperBound) ? upperBound : (number > lowBound && number < upperBound) ? number : false;
// // my solution using Math Object
// const clampLow = Math.max(number,lowBound);
// const clampUpper= Math.min(clampLow,upperBound);
// return clampUpper;
// my solution using Math Object but in one line
return Math.min(Math.max(number,lowBound),upperBound);
}
};
const test1 = _.clamp(10,-5,5);
const test2 = _.clamp(-10,-5,5);
const test3 = _.clamp(0,-5,5);
console.log(test1);
console.log(test2);
console.log(test3);
// Do not write or modify code below this line.
module.exports = _;
```

I was looking at the walkthrough when I finished and tested my code and the solution code instead uses

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

Is there a difference? and is there a preference in the industry?

I had 2 solutions for mine as shown above without looking past step 3 I just coded how it was described. Should I use the:

// my solution for readability code

or

// my solution for clean code

or

// walkthrough code from the video?

or

// my solution using Math Object but in one line