DEV Community

Discussion on: Key JavaScript Concepts I Mastered During LeetCode’s 30-Day Challenge

Collapse
 
ilatif profile image
Imran Latif

Yes, you are correct. In my case, all I needed was a way to get number of parameters a function is accepting to solve a specific LeetCode problem. But yes, one should be careful while using length property on functions due to the reasons you've explained with examples.

Thanks!