kairu – 14-23 Feb 7
I have a section in my code I don't really understand.
function nameOfFunction(a, b = null, c = null) { }
what does setting the something to = null
in the parameters do?11 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
oh gotcha!
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
what kind of usecase would these normally be used in? if you need something to be null but not undefined?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
:0 this part sounds very useful
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
oh I see what you're saying, use one type to determine whether a specific variable needs to be handled before running a whole function on it if it has multiple possible types
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
thanks so much for helping me! sorry I got pulled into a meeting and couldn't respond immediately 😭
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/1072522902966112386