Sniberb
Sniberbβ€’3y ago

πŸŽƒ Spookyberb πŸŽƒ – 09-11 Nov 17

How could I iterate over an object, and convert any string prop thats falsy to a -?
4 Replies
ScriptyChris
ScriptyChrisβ€’3y ago
Object.entries + loop
Sniberb
SniberbOPβ€’3y ago
Object.entris + map? I want it to a new variable, thats the cleanest way right?
ScriptyChris
ScriptyChrisβ€’3y ago
Can be You have to call Object.fromEntries afterwards to transform it into object again
reactibot
reactibotβ€’3y 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/1042728665479385108

Did you find this page helpful?