7 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
they are in this case, input will be always a number
I just wanted to demonstrate two variants that I thought of
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
good to know, thanks 🙂
so this should be the correct way to write it, right?
const v3 = value > 0 ? 1 : 0;
or Number(value > 0)
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
you're right, good point ->
value !== 0 ? 1 : 0
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/1052648404519501884