✅ – ekomS – 23-35 Dec 21
Howdy all. I've got this sort function which prioritizes truthy values in an array:
Is there a better way to coerce the condition to its relevant value?
e.g. a && b -> 0, a -> -1, b -> 1
3 Replies
Got it
Changed
Lol, caught in the act
Fair enough
Thank you
Another question, is there a better way to handle the
emptyCallback
bit?
Currently I've got:
The idea being that if a callback is not provided to the function, it will return the parameters
Are my arguments coerced into a boolean?
Ah okay
Well
The value will always be a boolean
This is how I want to use the function
Makes sense
Perfect
That's what I'm looking for
Thank you
I implemented bothThis question has an answer! Thank you for helping 😄
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/1055267274254209174
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/1055267274254209174
Question not getting answered? Maybe it's hard to answer, or maybe you asked at a slow time. Check out these resources for help asking a good question:
https://stackoverflow.com/help/how-to-ask
http://wp.me/p2oIwo-26