Including a stack trace when logging - console.trace

suggest change
function foo() {
  console.trace('My log statement');
}

foo();

Will display this in the console:

My log statement       VM696:1
  foo                  @ VM696:1
  (anonymous function) @ (program):1

Note: Where available it’s also useful to know that the same stack trace is accessible as a property of the Error object. This can be useful for post-processing and gathering automated feedback.

var e = new Error('foo');
console.log(e.stack);

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Console:
* Syntax
* Chrome
* Safari
* Opera
* Including a stack trace when logging - console.trace

Table Of Contents
11 Arrays
12 Objects
14 Classes
16 Map
17 Set
24 Loops
27 Date
29 Scope
30 AJAX
35 Cookies
41 JSON
44 Fetch
45 Modules
46 Screen
64 Console
68 Symbols
73 Modals
76 Events
86 Proxy
89 WeakMap
90 WeakSet
102 Tilde