1<!DOCTYPE HTML>
2<meta charset="UTF-8">
3<title>Stack Trace Example</title>
4<body>
5<script>
6function trace() {
7 try {
8 throw new Error('myError');
9 }
10 catch(e) {
11 alert(e.stack);
12 }
13}
14function b() {
15 trace();
16}
17function a() {
18 b(3, 4, '\n\n', undefined, {});
19}
20a('first call, firstarg');
21</script>
22