• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
nbbaier

nbbaier

rendezvous-with-cassidoo-solutions

Public
Like
1
rendezvous-with-cassidoo-solutions
Home
Code
6
2025-07-28.ts
2025-08-04.ts
2025-08-18.md
2025-08-18.tsx
2025-08-25.tsx
README.md
Environment variables
Branches
1
Pull requests
Remixes
History
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
2025-08-18.md
Code
/
2025-08-18.md
Search
8/30/2025
Viewing readonly version of main branch: v286
View latest version
2025-08-18.md
url:
https://buttondown.com/cassidoo/archive/its-important-to-have-something-to-walk-towards/
date:
2025-08-18T00:00:00.000Z
number:
418

Interview question of the week

Last week, I had you make playlists with a certain duration! La la la good job Christian, Victor, Laasya, Paul, Elke, Ten, and David!

This week's question:
Write a generator function createLaundryItem() that returns an object representing a laundry item. This object should have a method nextCycle() which, when called, advances the item through a series of laundry cycles in order: "soak", "wash", "rinse", "spin", and "dry". After the final cycle, subsequent calls to nextCycle() should return "done".

Example:

let towel = createLaundryItem();

console.log(towel.nextCycle()); // "soak"
console.log(towel.nextCycle()); // "wash"
console.log(towel.nextCycle()); // "rinse"
console.log(towel.nextCycle()); // "spin"
console.log(towel.nextCycle()); // "dry"
console.log(towel.nextCycle()); // "done"
console.log(towel.nextCycle()); // "done"

(you can submit your answers by replying to this email with a link to your solution, or share on Bluesky, Twitter, LinkedIn, or Mastodon)

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.