This past week was Hurricane Irma. Thank goodness I decided beforehand to grab a ton of books from the library because boy did I lose power!
Let's talk about a few things that LJ3 has explained further for me:
for(variable of object)
This for loop can be used over any iterable object or array and should be used when knowing the index isn't required. Typically, I've always needed to use the index for, at the bare minimum a React key so I've never used it before. I'm excited to use this for loop in algorithms.
The difference in converting to Numbers using the Number constructor, parseInt , and parseFloat.
Okay, so this one definitely threw me for a loop! I've always used either parseInt or parseFloat. I didn't realize that you could also use Number for converting a number string into an integer! To be honest, it made me feel kind of silly for a second but, eh, what are you going to do?
To clarify, the difference between parseInt and parseFloat is that parseInt only parses a number string involving numbers while parseFloat will still convert a number from a string that has other characters in it such as "365 days". It's really helpful when you prompt a user for a number of something and they give you the number as well as the measurement.
I think this might be one of my new favorite things. It makes a variable explicit and unique. If you declare a symbol it matches no other symbol! You can also give them descriptions! This is super cool and I can't wait to read chapter 9 to dive deeper into this really nifty constructor and data type!
All in all, I love this book so far! It's staved off boredom and I've learned a bit about concepts I've already come in contact with in day-to-day coding. Moral of the story: Never judge a programming book by its title.