Web dev

Javascript var_dump, print_r PHP like

function var_dump(obj) {
   var res = '';

   for (var i in obj) {
      res += i + ": " + obj[i] + "\n";
   }
return res;
}

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.