Yesterday I could not finish my memory game. I will. I need help. Or a rest. I’ll get both. Maybe even some ice cream.
Instead of donning my cranky pants, I opted to do an -ish. This is day 10ish. Day 10 is still a memory game, and don’t you forget it. Although I could not get the code right (yet), I learned the Fisher-Yates Shuffle algorithm and revisited prototypes. Today I decided to play with both.
I brought the Array.prototype.shuffle from yesterday’s code into today’s, and then wrote three more functions that used my very fancy and kind of sexy prototype. I scrambled eggs, which also was an exercise in CSS shapes and dynamically inserting elements into a hardcoded element. I shuffled my name, which was not at all challenging. I shuffled your name, which entailed my capturing the name from an input field, doing some .string() magic, and then shuffling.
I kind of like making prototypes. Unfortunately, it sounds all robot like, and whenever I think of prototypes, I get that dumb Styxx song stuck in my head. If I should suffer, you should, too: