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

So I just finished this. My understanding (after a lot of confusion around the same things you’re mentioning) is that they want to present a goal/problem, and have us finish it on our own, and then compare our different paths. For instance, the _.clamp() method had different ways of being implemented. They are just laying out the steps as follows:

  1. Learn what this method is supposed to do, plan how you would implement this
  2. Here are some different components that could be used to have this method perform how we want it
  3. This is how they (codecademy) achieved it
  4. Use this node syntax to check to see how well your method accomplishes what it was set out to do

I will post my code below for reference: