Return properties of an Obj


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

prop(obj);
//usually use "$(str).appendTo(''#ul")


Copy this code and paste it in your HTML
  1. var prop = function (a) {
  2. var str = "";
  3. for (var i=0; i<a.length; i++) {
  4. str+= "<li>Obj Property: " + a[i] + "</li>\n";
  5. }
  6. return str;
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.