We experienced a significant hailstorm last night, and it was incredibly loud—particularly when the hail struck the skylights. From what I’ve read in a Facebook group I’m part of, some skylights have been damaged. Thankfully, ours remained intact. However, the storm’s intensity made it sound as though they were breaking. I was also concerned about the car, but fortunately, it came through without any dents.
Last Friday, Tommy had bloodwork done in the morning in preparation for his doctor’s appointment scheduled for this morning. Later, we worked out in the garage and decided to check if our camping tent was still in good condition, so we set it up in the driveway. It’s a really large tent! Overall, everything turned out well; however, after taking it down, we discovered that one of the poles had broken. Tommy is currently looking into replacing that part. Fortunately, the tent itself is in good shape. We also stopped by Walmart to buy a duffle bag for the tent since the original bag was badly ripped.
Saturday marked Karissa’s graduation, and the ceremony was quite lovely. Unfortunately, Kel couldn’t take the day off, and the boys had to work, so it was just Tom and me attending. Karissa looked great in her cap and gown. The ceremony lasted two hours, but we had to arrive an additional two hours early, which made for a lengthy wait. Afterward, she expressed a craving for Raising Canes for lunch, so we took her there. This was my second time trying Raising Canes, and I found it to be quite good.
On Sunday, it rained for most of the day, and later that night we experienced a hail storm. I was surprised that we didn’t lose power. Unfortunately, Karissa’s hearing aid is malfunctioning again. I’m unsure what’s wrong with it—it either isn’t charging, or the speaker may be blown. She has an appointment scheduled for this coming Friday to have it checked. I’m concerned that Costco may no longer service the brand of hearing aid she has. We’ll find out on Friday if they can fix it or if she’ll need to purchase a new one.
I think I figured out the promise function. I did this with a lot of help from Google. Here is what I have:
function promiseAll(promises) { return new Promise((resolve, reject) => { const results = []; let completed = 0; promises.map((promise, index) => { Promise.resolve(promise) .then(value => { results[index] = value; completed++; if (completed === promises.length) { resolve(results); } }) .catch(error => { reject(error); }); }); if (promises.length === 0) { resolve([]); } }); }
Step-by-step explanation:
1. function promiseAll(promises)
- Define a function called promiseAll.
- It takes one argument: promises, which should be an array of promises (or regular values).
2. return new Promise((resolve, reject) => {
- promiseAll itself returns a new Promise.
- This Promise will either resolve with all the values if everything goes right, or reject if any promise fails.
3. const results = [];
- Create an empty array results to store each promise’s resolved value at the correct index.
4. let completed = 0;
- Track how many promises have finished (completed will increase every time a promise resolves).
5. promises.map((promise, index) => {
- Use .map() to loop through each item in the promises array.
- index helps us know where to store the result.
6. Promise.resolve(promise)
- If promise is not actually a Promise (maybe just a number or string), wrap it into a real Promise.
- This makes the code safe to handle both values and promises.
7. .then(value => { … })
- If the Promise resolves successfully:
- results[index] = value;
- → Store the value in the correct spot.
- completed++
- → Increase the completed counter.
- if (completed === promises.length)
- → If all promises are done, resolve(results) with the full array.
8. .catch(error => { reject(error); })
- If any promise rejects (fails), immediately reject the outer promise with that error.
- No waiting for the others. First failure = total failure.
9. if (promises.length === 0) { resolve([]); }
- Special case: if the input array was empty ([]), immediately resolve with an empty array.
- Otherwise, the .map() loop wouldn’t run at all, and the promise would stay pending forever.
I’m planning to make some hot tea and put clothes away. It’s been raining intermittently all day. I’ve been keeping an eye on the weather at Lexi’s school, hoping for a sunny day on Saturday for her graduation. Tommy and I will leave Friday night to get there in time for the honors breakfast on Saturday morning. Kel, Karissa, and I believe Jay will be joining us on Saturday morning. Alex and Chris won’t be able to make it.





