Live data from Hacker News

$.answer=42

google-analytics.com

1–10 of 27 posts

Re: $.answer=42

#7
post #3

$ is what? [1] [1] For those not in on the joke: http://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker.27s_...

An identifier must start with $, _, or any character in the Unicode categories “Uppercase letter (Lu)”, “Lowercase letter (Ll)”, “Titlecase letter (Lt)”, “Modifier letter (Lm)”, “Other letter (Lo)”, or “Letter number (Nl)”.

From: http://stackoverflow.com/questions/1661197/valid-characters-...

Re: $.answer=42

#10
post #3

$ is what? [1] [1] For those not in on the joke: http://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker.27s_...

var $=function(a){J(1);Z.D[G](Z,[arguments])};

$ is a function object.

$.answer is a property of that object.

$ itself doesn't really mean anything special in javascript.

jQuery and other libraries often use $ as their main object, so it's probably best to avoid using it unless you need to or it's wrapped in another function.

Post reply on HN