Is okay for a global & prototype function name to have the same function name.
function doThis(){}
&
el.prototype.doThis = function (){}
Can these two be used together in the same script?
I tried it and they both worked correctly, but I need to know if it’s safe to use them together.
>Solution :
Yes you can. They are stored in different scopes
function doThis(){}
Is in your global script scrope. // doThis();
el.prototype.doThis = function (){}
Is only accessable with the specified object el // el.doThis();
I would prefer to name them differently to avoid misunderstandings.