That title is almost click bait. But not. I never know what to title these posts.
After researching Google, Tommy discovered that the drunk driver that killed Kevin appealed his case. It was unsuccessful, and back to prison for the time the judge initially gave him. I’m not sure how I feel about all that. I’m glad this drunk driver is back in prison for what he did. It’s best to keep him off the road. This wasn’t his first offense. Yes, I know his name but do not feel I need to say it here. I know what prison he is sent to. Somehow that makes me feel better. I can’t believe he had the audacity to appeal his case as if he believes the justice system wronged him in any way. I know he had a right to one, but I’m unsure what he thought. He left five kids without a father. Kevin had a passenger in his car when this happened. There was also another victim that was seriously injured as well.
Tonight I’m going with Tommy to study. I will probably read or watch something. I’m on a new book, Beach Read. So far, it’s an interesting book. I feel this book will be a mindless read of cliche tropes. So I’m up for that. Another book came from my library’s hold list; Legends and Lattes—a fantasy book. I heard great things about it, but I doubt those reviews for some reason. The book had been so hyped up I’m almost wondering if I would be disappointed. Will it live up to the hype? I may have to check this book from the library again since I’m reading Beach Read. I can’t read two books at once. It isn’t that I can’t follow two books at once. I can. But I don’t want to. I want to finish the book I’m reading and then go to another story.
JavaScript today was about manipulating objects and arrays. I was able to understand the subject better today. It’s still a bit confusing, and I wonder if I will ever remember what I’m learning. But I just started. It will come to me.
——————————————–
Sometimes you may want to store data in a flexible Data Structure. A JavaScript object is one way to handle flexible data. They allow arbitrary combinations of strings, numbers, booleans, arrays, functions, and objects.
const ourMusic = [ { "artist": "Daft Punk", "title": "Homework", "release_year": 1997, "formats": [ "CD", "Cassette", "LP" ], "gold": true } ];
The sub-properties of objects can be accessed by chaining together the dot or bracket notation.
const ourStorage = { "desk": { "drawer": "stapler" }, "cabinet": { "top drawer": { "folder1": "a file", "folder2": "secrets" }, "bottom drawer": "soda" } }; ourStorage.cabinet["top drawer"].folder2; ourStorage.desk.drawer;
As we have seen in earlier examples, objects can contain both nested objects and nested arrays. Similar to accessing nested objects, array bracket notation can be chained to access nested arrays.
const ourPets = [ { animalType: "cat", names: [ "Meowzer", "Fluffy", "Kit-Cat" ] }, { animalType: "dog", names: [ "Spot", "Bowser", "Frankie" ] } ]; ourPets[0].names[1]; ourPets[1].names[0];