Merlin, the puppy, likes to sleep under my office chair. He spent about 90% of his day there today. Speaking of the puppy… this puppy needs a bath.
I think I have health insurance again. I do need to call them tomorrow and ask some questions. I went today and got my blood pressure medications and it didn’t cost me anything. So that is good. I have a medication management appointment next week, which is good cause I’m completely out of my anxiety and adhd medications. I still only have a slight withdrawal symptom. My skin still feels like it is burning or itching every now and then. Not sure which medication withdrawal is creating this symptom.
I fell off the step ladder yesterday. I lost my footing. Now my right foot hurts. The pain is about a 7. I tried to stay off of it as much as I can today. And utitlized the kids to help me out when needed.
I need a new book to read. I’m out of reading material and hadn’t yet gone looking for more.
I took care of Digital Ocean and paid that account. Only took me a few weeks to figure out why I couldn’t log in.
I still haven’t changed my ENT appointment. It’s on the same day as Tommy having his surgery so I need to change that. I have such anxiety about the phone that it makes it hard for me to just make a simple phone call to reschedule an appointment. But tomorrow. Tomorrow I will call and change that appointment.
I need to get going and get some veggies for tonight’s dinner. We have some marinated chicken from Costco that we are having tonight. Now I just need to sneak away from the puppy so not to wake him.
JavaScript notes. today was a bit confusing. I don’t have it down yet.
—————————————–
In some situations involving array destructuring, we might want to collect the rest of the elements into a separate array.
The result is similar to Array.prototype.slice(), as shown below:
const [a, b, ...arr] = [1, 2, 3, 4, 5, 7]; console.log(a, b); console.log(arr);
The console would display the values 1, 2 and [3, 4, 5, 7].
Variables a and b take the first and second values from the array. After that, because of the rest syntax presence, arr gets the rest of the values in the form of an array. The rest element only works correctly as the last variable in the list. As in, you cannot use the rest syntax to catch a subarray that leaves out the last element of the original array.
In some cases, you can destructure the object in a function argument itself.
Consider the code below:
const profileUpdate = (profileData) => { const { name, age, nationality, location } = profileData; }
This effectively destructures the object sent into the function. This can also be done in-place:
const profileUpdate = ({ name, age, nationality, location }) => { }
When profileData is passed to the above function, the values are destructured from the function parameter for use within the function.