Skip to content

Instantly share code, notes, and snippets.

@ideesimple
Created December 16, 2010 16:20
Show Gist options
  • Save ideesimple/743594 to your computer and use it in GitHub Desktop.
Save ideesimple/743594 to your computer and use it in GitHub Desktop.
afficher valeur dans un tableau via javascript
function var_dump(obj) {
if(typeof obj == "object") {
return "Type: "+typeof(obj)+((obj.constructor) ? "\nConstructor: "+obj.constructor : "")+"\nValue: " + obj;
} else {
return "Type: "+typeof(obj)+"\nValue: "+obj;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment