What is the best way(s) to fake function overloading in Javascript?
I know it is not possible to overload functions in Javascript as in other languages. If I neede
The first option really deserves attention cause it's the thing I've come up in quite complex code setup. So, my answer is
- Using different names in the first place
With a little but essential hint, names should look different for computer, but not for you. Name overloaded functions like: func, func1, func2.