View Single Post
Old 04-21-2009, 10:43 PM   #5 (permalink)
Kalle
The Frequenter
Zend Certified 
 
Join Date: Sep 2007
Location: Denmark
Posts: 352
Thanks: 8
Kalle is on a distinguished road
Default

Quote:
Originally Posted by allworknoplay View Post
Thanks you two....

Leave up to Salathe to provide a little history as well! haha..

I appreciate it though, the more I can absorb the better.

And I promise, soon enough I will be a pro like you guys and won't be asking so many questions..

I'm in my "catching up" phase...

As for books, I do agree, the web is better, faster and more current. I've always like to support the authors a bit, not sure how much of a cut they get though from book sales...I'm sure not very much...

This book is newly published and seems ok....

http://www.amazon.com/Professional-J...0338446&sr=1-8


So far JS code looks eerily similar to PHP....except they don't use $ signs for their variables..


PHP:

for($i=0;$<10;$i++) {

}

JS:

for(i=0;i<10;i++) {

}

I'm sure as I learn more it will start to separate itself from PHP syntax/format...
But Javascript variables may contain $ (its called a sigil, PHP and PERL's sigil is $ for example. But in Javascript you may choose to prefix with a sigil or not) if you want, the following is perfectly valid:

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

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

$closure();
__________________
Send a message via MSN to Kalle Send a message via Skype™ to Kalle
Kalle is offline  
Reply With Quote
The Following User Says Thank You to Kalle For This Useful Post:
allworknoplay (04-21-2009)