weedo tech blog

le blog technique de la team weedo

  • Home
  • Ka on twitter
    • Edit
    • Delete
    • Tags
    • Autopost

    Var_dump() en JS

    Une fonction pratique que j'ai trouvé sur le net :

    [code:javascript]function dump(obj) {
        var out = '';
        for (var i in obj) {
            out += i + ": " + obj[i] + "\n";
        }

        alert(out);

        // or, if you wanted to avoid alerts...

        var pre = document.createElement('pre');
        pre.innerHTML = out;
        document.body.appendChild(pre)
    }[code]

    • 19 July 2010
    • Views
    • 0 Comments
    • Permalink
    • Favorited 0 Times
    • Tweet
    • Tweet

    Comments 0 Comments

    Leave a Comment

  • About ka

    My Google Profile

  • Contributors

    • ka
    • Ballut Vincent
    • fix
    • Stevan Gaillard
  • Subscribe

    Subscribe to this posterous
    Unsubscribe
    Follow this posterous RSS
    You're a contributor here (Edit)
    This is your Space (Edit)
    Follow by email »
    Get the latest updates in your email box automatically.
  • Follow Me

      TwitterDelicious

Theme created for Posterous by Obox