fun with $ in Js

have you ever tried with character javascript variable ? trust me i am not kidding ;) . javascript supports two special one character variable. one is underscore(_) and another one is ($). Try out in your firebug console.

_ = ' i am an underscore';
$ = ' 6 million dollar man';
alert(_ + ' : ' + $);

Isn’t it interesting ? but dont use it professionally if you are not master in javascript as it would be make others ins puzzle about what the variable means.

Cheer$
$haymoL

Advertisement

One Response to fun with $ in Js

  1. shaffy says:

    great post

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.