View Single Post
Old 04-21-2009, 10:50 PM   #6 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default

Quote:
Originally Posted by Kalle View Post
But Javascript variables may contain $ if you want, the following is perfectly valid:

javascript Code:
for($i = 0; $i < 10; ++$i)
{
    /* ... */
}

var $closure = function()
{
    alert('Hello World');
};

$closure();

Really??? That's great! I'm going to do that then so that I can be more consistent with PHP....

Now that looks even more like PHP....or should say, PHP looks more like JS...

Good stuff!!!
allworknoplay is offline  
Reply With Quote