<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/on-hold-svbs03pce" -->

---
title: On Hold | daily.dev
description: A JavaScript snippet from a web application&#x27;s wait time page hardcodes the actual minute value directly into string literals across a long if-else chain,...
canonical: https://daily.dev/posts/on-hold-svbs03pce
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: On Hold | daily.dev
og:description: A JavaScript snippet from a web application&#x27;s wait time page hardcodes the actual minute value directly into string literals across a long if-else chain,...
og:url: https://daily.dev/posts/on-hold-svbs03pce
og:image: https://api.daily.dev/og/posts/SVBs03pCE.png
og:image:alt: On Hold
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# On Hold

**[The Daily WTF](https://daily.dev/sources/thedailywtf)** · 3 min read · 1 upvotes · 0 comments

## Summary

A JavaScript snippet from a web application's wait time page hardcodes the actual minute value directly into string literals across a long if-else chain, rather than using template literals or string interpolation. The result is a convoluted block of code that outputs hardcoded text like '0 hour' or '12 minute' instead of dynamically formatting the wait time. A simple template literal expression would be both shorter and more correct.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thedailywtf.com/articles/on-hold>

## Similar posts on daily.dev

- [Wait Longer](https://daily.dev/posts/wait-longer-wnionl7cc) · The Daily WTF · 22 upvotes · 3 comments
- [Time is a construct but it can still break your software](https://daily.dev/posts/time-is-a-construct-but-it-can-still-break-your-software-bfsxtqo37) · Stack Overflow Blog · 2 upvotes · 0 comments
- [Temporal: The 9-Year Journey to Fix Time in JavaScript](https://daily.dev/posts/temporal-the-9-year-journey-to-fix-time-in-javascript-ti2wilj4c) · Hacker News · 1 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/on-hold-svbs03pce)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"On Hold","url":"https://daily.dev/posts/on-hold-svbs03pce","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/on-hold-svbs03pce"},"datePublished":"2026-07-07T10:37:41.150Z","dateModified":"2026-09-14T06:49:29.116Z","description":"A JavaScript snippet from a web application's wait time page hardcodes the actual minute value directly into string literals across a long if-else chain,...","image":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","thumbnailUrl":"https://media.daily.dev/image/upload/s--ZrL_HSsR--/f_auto/v1722860399/public/Placeholder%2006","isAccessibleForFree":true,"articleSection":"The Daily WTF","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Daily WTF","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/d21a6aa61a7244d893a3b3284df8e2ef","url":"https://daily.dev/sources/thedailywtf"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/on-hold-svbs03pce","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,javascript","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Daily WTF","item":"https://daily.dev/sources/thedailywtf"},{"@type":"ListItem","position":3,"name":"On Hold"}]}
```

