jQuery Variable $ zum Beispiel funktioniert sowohl als Objekt und Funktion.
// You can access object properties such as
$.fn;
// or
$.isReady;
// You can also call the function $ such as follows
$();
Wie Variable $ funktioniert sowohl als Objekt und Funktion zu machen?
$ = function(){} // ???
$ = {}; // ???
Fügen Sie einfach Eigenschaften hinzu wie: function $() {...}; $ .val = 5: alert ($ .val); $(); – user7951676
Alle Funktionen sind Objekte in js, so dass Sie Eigenschaften hinzufügen können. – user7951676