I want a variable like $ that is sort of special, but I'm already using jQuery, so $ is taken.
views:
322answers:
5Underscore is the only one I can think of. You can put a few together like _$_
.
Starting in JavaScript 1.5, you can use Unicode such as å.
Unfortunately, older javascript supports letters, numbers, underscores, and $ in identifiers. In javascript 1.5 and later you can use Unicode characters, but that would be a very bad idea as they can be a pain to enter into most editors, and certainly aren't something you would want to have to type very often.
The one I like it best:
λ = Function;
Unfortunately is very difficult to type it.
If you want a special variable like $ but $ is already taken by jQuery, why not use something that starts with $, like $a or similar? Just make sure it's one that jQuery doesn't also define.
Prototype uses $ and a $$. If you're using jQuery, you could use $$. However, unless its really well documented, this may be a bad idea--especially if someone else has to maintain this code after you've moved on.