Foreach-as(PHP) vs for-in(Javascript) and other differences between PHP and javascript


okay so I tried to learn javascript first, and I was having trouble with contact list exercise from javascript. So i decided to learn something new and went to learn PHP. I completed it today, and now I decided to resume learning javascript from where I left off. I noticed that there are some similarities, and instead of making a lot of topics about it, I decided to put them all in this one.

1- Is foreach-as(PHP) same as for-in loop(Javascript) ?
2- "key"=>"value" for PHP and "key":"value" for javascript. am I right?(in objects)


google search
== discussions / opinions ==
foreach(PHP) vs for-in loop(Javascript)