/ Published in: JavaScript

This is the equivalent of doing php's foreach loop in javascript.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//In PHP foreach($data as $key => $value){ //write code here } //In Javascript the same construct looks like this for(key in obj){ var value = obj[key]; //write code here }
Comments
