Hey friends!
I hope you had a good week! Mine was full of cleaning and getting excited for fall weather in Chicago. Onwards!
Was this forwarded to you? You can subscribe here!
Introduction to AT Protocol
MCSS: A modern classless CSS framework
ts-http-status-codes: A better way to manage HTTP status codes
Circular gallery of rounded images
I wrote about how I built my cry-tracking app, Ductts this week! I feel like besides that and swiffering my floors, I haven't gotten a lot done lately. My new baby is turning four months old (!) today, and between him and my toddler, we're just constantly chasing, feeding, changing, reading to, and playing with them. It's fun, it's good, and I'm grateful for maternity leave, but... I'm so exhausted all the time. I know it'll get easier eventually, so I'm staying as positive as possible and trying to savor the small moments (...and crying about them and logging into Ductts very often). Parenting is the most challenging joy, ever.
No sponsor this week! Please consider checking out one of the apps I've made recently:
Or, if you feel so inclined to help support my work financially in other ways, you can use Patreon or GitHub Sponsors (both of which get you access to a very fun Discord group)!
Last week, I had you make a laundry generator function. Squeaky clean good job Paul, Ten, Ender, Ida, Collin, Miguel, Elke, Jonathan, Kriszti, Dani, Vasanth, Andrew, Pedro, Victor, Christian, Stephen, Laasya, Amine, and Jeremias!
This week's question:
Given an array of order objects for a restaurant, each with a table number and a list of ordered items, write a function that returns an object mapping each table number to a summary of how many times each item was ordered at that table. Extra credit: Could you go so far as to make this a restaurant management game?
Example:
const orders = [
{ table: 1, items: ["burger", "fries"] },
{ table: 2, items: ["burger", "burger", "fries"] },
{ table: 1, items: ["salad"] },
{ table: 2, items: ["fries"] }
];
> orderSummary(orders)
{
1: { burger: 1, fries: 1, salad: 1 },
2: { burger: 2, fries: 2 }
}
// or, string output format:
"Table 1 ordered 1 burger, 1 fries, and 1 salad. Table 2 ordered 2 burgers and 2 fries."
(you can submit your answers by replying to this email with a link to your solution, or share on Bluesky, Twitter, LinkedIn, or Mastodon)
Landlines are making a comeback… with children
The Food Timeline
How we built Bluey’s world: tales from original series art director, Catriona Drummond
Which Keyboard size is right for you? (video)
Walking into solid objects can be painful, according to a recent pole!
That's all for now, folks! Have a great week. Be safe, make good choices, and call your parents!
Special thanks to Ezell, Ben, Kinetic Labs, and Marta for supporting my Patreon and this newsletter!
cassidoo
website | blog | github | bluesky | twitter | patreon | twitch | codepen | mastodon