If i remember correctly, the Codecademy project that you were working on is re-writing some of the lodash.js library. The purpose of the lodash library is that all of the functions you made would be ready to go and save you a lot of time!
Hope that helps!
Thanks for your reply.
So for example, if i want to use .clamp() method from lodash library in my actual project then i have to just import lodash library, i don’t have to make another method to make clamp() work, right ?
.clamp() Is already written in the lodash library so once you’ve imported it, you can call the function without writing it yourself.
Lodash should contain useful functions/methods to speed up development. You can just use these methods as already mentioned
codecademy also took this opportunity to teach you about how certain of these methods might be implemented
Hey @betaslayer45561, when you get a moment I’d appreciate you marking this topic as solved. Thank you!
Edit: looks like @stetim94 got it - thanks stetim!
sorry to rehash the old problems but I was just working through the module and was wondering about something. Why would we use lodash instead of js default methods like whats the benefit of using _.words over of .split() method?
_.words seems to do a better job when dealing with punctuation marks, from the docs:
_.words('fred, barney, & pebbles'); // => ['fred', 'barney', 'pebbles']