javascriptdebuggingfirefoxweb-console

Why doesn't console.table work in Firefox?


Why doesn't console.table (or certain other console methods) work in Firefox, or return an error?


Solution

  • Firefox's built-in Web Console, ignores unknown console calls rather than throw an exception. So while a normal call, e.g.

    window.table()
    

    or any unknown method of a normal object, you get something like:

    [20:29:35.381] TypeError: window.table is not a function
    

    However:

    console.table({foo: 'bar'})
    

    just returns undefined without doing anything, even though:

    typeof console.table
    

    returns:

    "undefined"