JS: Dollar Sign in JavaScript (jQuery)

By Xah Lee. Date: . Last updated: .

Many JavaScript library use dollar sign $ as the name of their primary function.

The dollar sign is allowed character of identifier. [see Allowed Characters in Identifier]

This practice seems to have started with the Prototype JavaScript Framework “prototype.js”, then other libraries picked it up, in particular jQuery. [see jQuery Tutorial]

JavaScript spec 1999 suggests that the dollar sign should be used for generated code:

js ECMA-262 3 1999
ECMA-262, 3rd edition, December 1999
“The dollar sign ($) and the underscore (_) are permitted anywhere in an identifier. The dollar sign is intended for use only in mechanically generated code.”

However, JavaScript spec year 2011, no longer says that.

This standard specifies specific character additions: The dollar sign ($) and the underscore (_) are permitted anywhere in an IdentifierName.

ECMAScript 5.1 §7#sec-7.6

JS dollar sign use in prototype.js, ~2008

this article, was written in 2008. it discuss the dollar sign used by prototype.js.

js dollar sign in prototype 2026-07-23 141ed ll
js dollar sign in prototype 2026-07-23 141ed ll

JavaScript exclamation and dollar sign