SammSampa
SammSampa
Reputation Top 5%
Samm Sampa
1 Snippet  (604th place)
Published
1 Channel
Created
1 Channel
Following
51 points  (600th place)
Reputation
Junior Code Generator
Junior Publisher
Junior Trend Maker
Junior Popular Coder
Junior Autobiographer
Senior Autobiographer
Master Autobiographer
Junior Famous Coder

Recent Snippets See all snippets by SammSampa

public by SammSampa  2471  3  6  1

Loop through an Object Contents in Javascript

// Enter here the actual content of the snippet.            
var obj={
  id:1,
  url:'http://www.facebook.com',
}

 Object.getOwnPropertyNames(obj).forEach(function (val, idx, array) {

            console.log(val + 'has' + obj[val]);
  });            
;