this
is my entry for my second week of JavaScript fundementals at the Northcoders bootcamp. this
week has been a big one, as we were introduced to a new paradigm in the form of Object Orientated Programming.
if (readerLikesContent === true) {
followOnGitHub: fearneyork;
}
Check me out on GitHub.
What I've learnt this week
Recursion, recursion, recursion β½
Before this week, getting to grips with recursion seemed like a much bigger mountain to have to climb. After hearing how other devs view recursion, I had built it up in my head to be something far more challenging than what it very simply boils down to be; a function that calls itself.
I'm looking forward to finding use cases for recursive functions in my code to see how I can use it!
And I OOP!
The latter half of the week was all to do with switching up the way we work, and instead on relying on pure functional programming, we are started by looking into Factory Functions and learning about the implicit binding of this
.
Pseudo-classical design, constructors, and prototypes
This part of the week was definitely a mind-bending ride. Thinking I understood the concept I set out solving the challenge given to us, of creating a class that would take arguments and return a Pokemon object with all of the fields filled in.
What I tried to do was enter a single argument of the Pokemon name, and have a separate libraray of infomation that would be pulled in and added to the properties to be returned out of the function. And what I found was that manually creating this library of information is a pretty arduous task. My mind then went to look if there was any way to outsource this task to somewhere else, and started to think about using an API to pull this infomation in.
The PokeAPI seemed like the solution to all of my problems and I had thought about trying to implement it. BUT, it turns out I was overcomplicating the task that needed to be done and at this stage of the bootcamp the instructors were happy with all of the information being passed in, and assuming that if someone else was to input the information that it was all being done so correctly.
WOOPS. π€¦π»ββοΈ
Oh well, I enjoyed it all the same π
Resources I've found useful this week
I've not come across any brand new ones this week, nut I did still use the Northcoders notes, JEST docs, and MDN as usual!
Top comments (1)
This is great! π€