I’ve been keeping detailed notes in this blog for all the exercism.io problems that I’ve solved so far, but I don’t want to give away the answers to all the practice problems! Besides, they’re getting a little repetitive now, and much of what I’m doing is just review. So I’ll only keep notes on the new things that I’ve learned. If a particularly new or challenging problem comes up, then maybe I’ll blog about it in detail.
But I didn’t end up using that notation, because I find object constructor notation to be much easier to read:
Second, I learned how to convert a string into an array of the string’s characters using the split() method:
I also learned how to use the forEach() method for the first time! It’s just more compact than a
for loop when you want to run a function on each element of an array.
I also learned how to use the arguments object to create a function that can take different kinds of inputs. Along with the isArray() method and the typeof operator, I can use this to create a function that can take either a string or an array as its input!
I really thought I could finish this problem before the end of the day, but I ran out of time. Tomorrow I’ll get it working for sure!