MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/yl499s/be_careful_with_javascript_default_parameters/iuybq4a/?context=3
r/javascript • u/Wake08 • Nov 03 '22
8 comments sorted by
View all comments
2
I've been bitten by this before. Set default parameter and then function is called with null. That is why now I use TS for all projects and crank tsconfig options to the max.
2
u/gketuma Nov 03 '22
I've been bitten by this before. Set default parameter and then function is called with null. That is why now I use TS for all projects and crank tsconfig options to the max.