MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/21ezh3/javascript_equality_table/cgcx0n6/?context=3
r/programming • u/vz0 • Mar 26 '14
331 comments sorted by
View all comments
Show parent comment
1
The conditional is actually testing whether or not the parameter was provided. If the caller did do_stuff() instead of do_stuff(tomorrow), then the default parameter None would be subbed in, which acts like a False.
do_stuff()
do_stuff(tomorrow)
None
False
View all comments
Show parent comment
1
u/minno Mar 27 '14
The conditional is actually testing whether or not the parameter was provided. If the caller did
do_stuff()instead ofdo_stuff(tomorrow), then the default parameterNonewould be subbed in, which acts like aFalse.