JavaScript version of var_dump

<script> function dump(obj) { var out = ''; for (var i in obj) { out += i + ": " + obj[i] + "\n"; } alert(out); } </script> // or, if you wanted to avoid alerts and var_dump() on the page… <script> function dump(obj) { var out = ''; for (var i...