Overwhelmed

Happy Monday! Today was a bust when it came to coding. I did code. But I also helped look for a driver’s license, which took most of my day. So now I need to go dinner shopping here soon, so I feel like I haven’t done anything today. I did get Lexi’s medication refilled, so I did something productive today. Karissa did my laundry, so I have laundry to put away later.

I need to get grocery shopping. I will write after.

My cat has been under my desk for two hours. I have dinner started in the Instant Pot. We have orange chicken tonight. The problem with zesting an orange is now I have to eat the orange, and I don’t feel like eating an orange right now. I love the Instant Pot. Dump all the ingredients in and cook. And it is faster than the slow cooker.

I’m so restless, and I can feel my adrenaline running. I think I’m going to read after I write here. Try to calm my nerves. Even though I did some errands today, I feel like I still need to write down what I did.. just so my head can stop being so overwhelmed.

Let’s see, I refilled Lexi’s medication. I went to the post office. I called the university bookstore. I still need to make an appointment for Karissa. I will do that tomorrow.

Last weekend, Tommy and I decided to get away so he could study. We went up and saw Alexis at school and used the library. We got to our destination around 1 am on Friday. And got home at 11:30p on Sunday.

Dinner is ready. I’m going to the living room and relax and eat. I don’t feel as overwhelmed now. Dinner is done; I did get some coding done today. Laundry, I can wait until tomorrow for that: Alrighty, time for dinner.

JavaScript notes:
———————————————–
Objects are similar to arrays, except that instead of using indexes to access and modify their data, you access the data in objects through what are called properties.

const cat = {
  "name": "Whiskers",
  "legs": 4,
  "tails": 1,
  "enemies": ["Water", "Dogs"]
};

There are two ways to access the properties of an object: dot notation (.) and bracket notation ([]), similar to an array.

Dot notation is what you use when you know the name of the property you’re trying to access ahead of time.

const myObj = {
  prop1: "val1",
  prop2: "val2"
};

const prop1val = myObj.prop1;
const prop2val = myObj.prop2;

The second way to access the properties of an object is bracket notation ([]). If the property of the object you are trying to access has a space in its name, you will need to use bracket notation.

However, you can still use bracket notation on object properties without spaces.

const myObj = {
  "Space Name": "Kirk",
  "More Space": "Spock",
  "NoSpace": "USS Enterprise"
};

myObj["Space Name"];
myObj['More Space'];
myObj["NoSpace"];

Another use of bracket notation on objects is to access a property which is stored as the value of a variable. This can be very useful for iterating through an object’s properties or when accessing a lookup table.

const dogs = {
  Fido: "Mutt",
  Hunter: "Doberman",
  Snoopie: "Beagle"
};

const myDog = "Hunter";
const myBreed = dogs[myDog];
console.log(myBreed);
Facebooktwitterredditpinterestlinkedinmail