JavaScript Anonymous Method -
JavaScript Anonymous Method -
hi building little simple js framework university. having issues doing jquery.
currently can phone call methods $.method()
struggling on how $().method()
have looked @ source , can't seem work out how achieved it. every time seek adapt mine theirs not work.
so best way accomplish this.
function $() { homecoming object.create(proto); } $.method = function method() { ... }; proto.method = function method() { ... }; $.method(); $().method();
so have function properties methods , function returns object has methods.
also pro tip, $
poor variable name, utilize more meaningful.
javascript
Comments
Post a Comment