Lodash Project - Javascript Syntax Part II

I’m having trouble wrapping my head around what they’re asking me to do in this project. It’s unlike anything we’ve done so far.

First, I couldn’t get past step 2. I kept getting error messages. I watched the developer in the video go through it, did exactly what she did, and got error messages. I reset it, tried it again doing exactly the same thing, and somehow it worked. I have no idea why but at least I’m through that.

Now I’m on step 3. From what I can tell, this is kind of a fluff step and I’m not actually coding anything. I think what they want me to do is to think about how I would use code to achieve the same goal as the .clamp() method that we’re going to implement. Perhaps something like using a bunch of if/else statements to check if your number is within the boundaries and either returning your number if it is or returning the boundary otherwise. I just wish whoever wrote this could have used plain English because it took both my husband and I reading through it trying to make sense of their wording to come up with that.

Are steps 4 and 5 the same thing? I think they are but I can’t see the point of being told to “ideate” a different way to code something if they’re just going to tell me exactly how they want me to do it. That’s not really “ideating” at all, that’s just following their steps. So, if I’m right about steps 4 and 5, I basically skip step 4 and go to 5. Is that correct?

1 Like