(start)
| 2 | console.log('begin'); |
| 3 | |
| 4 | function makeCounter(start) { |
| 5 | let count = start; |
| 6 | const meta = { tag: 'C', list: [1, 2], nested: { a: 1 } }; |
| 7 | return function inc(step) { |
| 8 | const s = step ?? 1; |
| 9 | const before = count; |
| 10 | count += s; |
| 11 | console.log('inc', { before, s, count, metaTag: meta.tag }); |
| 12 | debugger; // pause inside closure with locals + closure vars |
| 13 | return count; |
| 14 | }; |
| 15 | } |
| 16 | |
| 17 | class Calc { |
| 18 | constructor(mult) { |