title: Is there a way to have 2 functions with the same name?
body: <p><a href="https://i.stack.imgur.com/KEKKQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KEKKQ.png" alt="enter image description here"></a></p>
  
  <p>I am trying to achieve a similar effect where I have 2 functions with the same name but they accept a different number of arguments. I know overloading is not possible in javascript and that the function that was defined last will be the one called everytime, however I want to know if there is a way to do so. I know I can name them differently, check for number of arguments, have defaults params, etc. but I am trying to avoid all that.</p>