Photo by Pankaj Patel on Unsplash
Today’s Progress:
Today I started ES6 section of fCC’s course ‘JavaScript Algorithms and Data Structures’. I’m currently 48% complete with it. The majority of todays challenges focused on destructuring.
I also read through Chapter 3 ‘Functions’ from Eloquent JavaScript by Marjin Haverbeke.
Quotes & Key Ideas:
let
vs. const
:
- “When you declare a variable with the
let
keyword inside a block, statement, or expression, its scope is limited to that block, statement, or expression" - “”
const
has all the awesome features that let has, with the added bonus that variables declared usingconst
are read-only. They are a constant value, which means that once a variable is assigned with const, it cannot be reassigned" - “However, it is important to understand that objects (including arrays and functions) assigned to a variable using
const
are still mutable. Using theconst
declaration only prevents reassignment of the variable identifier" - “To ensure your data doesn’t change, JavaScript provides a function
Object.freeze()
to prevent data mutation."
spread operator
vs. array destructuring
:
“One key difference between the spread operator and array destructuring is that the spread operator unpacks all contents of an array into a comma-separated list. Consequently, you cannot pick or choose which elements you want to assign to variables. Destructuring an array lets us do exactly that.”
Photo by Juan Rumimpunu on Unsplash
Thoughts:
The challenges on fCC were a little bit difficult today, especially the ones focused on destructuring. I will need to take another look at some of these or find some other resources to dive deeper into them.
Reading Eloquent JavaScript so far has been a useful method of review. The chapter I read today focused on functions and it was helpful to read about the theory of how these work and recall the work I did on the fCC’s challenges which involved functions. For now, I’m going to continue to skip the exercises in the book and come back to them later. The combination of completing the challenges/exercises on fCC and reading the book chapters seems to be working well for me.
For music today, I plugged in my speakers and played some Soft Piano Jazz and gave my room a bit of a cafe vibe — but without the loud espresso machine. (-;
Link to work:
For my progress visit the timeline on my freeCodeCamp Profile.
You can read my full #100DaysOfCode journal on GitHub