Hi I am building a small simple JS framework for University. I am having issues with doing something like jQuery.
Currently I can call methods by $.method() but struggling on how they do the $().method() as I have looked at the source and can’t seem to work out how they actually achieved it. As every time I try to adapt mine to look like theirs it does not work.
So what is the best way to achieve this.
So you have a function with properties that are methods and your function returns an object which has methods.
Also another pro tip,
$is a poor variable name, use something more meaningful.