What does the $() function do in JavaScript?

javascript

Solution

That's not part of ECMAScript (JavaScript). It's just a function defined by some library of yours. Usually jQuery or PrototypeJS.

Problem

What does the `$()` function do in the following example? ``` function test(){ var b=$('btn1'); eval(b); } ```

Original source

Related problems