Hailwood
Hailwood3y ago

Hailwood – 00-48 May 9

Is there a less verbose way of doing this now?
const steps = [];
for (let value = 15; value <= maxStreamRuntime; value += 15) {
if (value < 60) {
steps.push({label: `${value} minutes`, value});
} else if (value === 60) {
steps.push({label: `${value} minutes (1 hour)`, value});
} else {
steps.push({label: `${value} minutes (${value / 60} hours)`, value});
}
}
const steps = [];
for (let value = 15; value <= maxStreamRuntime; value += 15) {
if (value < 60) {
steps.push({label: `${value} minutes`, value});
} else if (value === 60) {
steps.push({label: `${value} minutes (1 hour)`, value});
} else {
steps.push({label: `${value} minutes (${value / 60} hours)`, value});
}
}
2 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
reactibot
reactibot3y ago
This thread hasn’t had any activity in 12 hours, so it’s now locked. Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/973023574585659442