JavaScript : Alert all the properties of an object


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var str = "";
  2. for (prop in obj)
  3. {
  4. str += prop + " value :" + obj[prop] + "\n";
  5. }
  6. alert(str);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.