r/javascript • • Nov 03 '22

Be Careful With JavaScript Default Parameters!

https://www.charpeni.com/blog/be-careful-with-javascript-default-parameters
1 Upvotes

8 comments sorted by

View all comments

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.