Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

User:outis

Welcome to your scratch page on the Mozilla Developer Center web site. For information on ways you can help improve our documentation, see How to help.

<code> rather than <pre>: var o = {a:1, b:2, c:3}; function show_props(obj, objName) { var result = ""; for (var prop in obj) { result += objName + "." + prop + " = " + obj[prop] + "\n"; } return result; } alert(show_props(o, "o")); /* alerts: o.a = 1 o.b = 2 o.c = 3 */

Document Tags and Contributors

 Contributors to this page: outis, Admin
 Last updated by: outis,