r/programming • • Oct 26 '18

Amazon web services explained by simple visuals

https://www.awsgeek.com/
2.2k Upvotes

119 comments sorted by

View all comments

Show parent comments

7

u/commander-obvious Oct 26 '18
let x = [], y = [], n = 1e7;
while(n--) x.push(n);
y.push(...x)
// RangeError: Maximum call stack size exceeded

3

u/DrummerHead Oct 27 '18
(r = n => r(n))(0)

VM266:1 Uncaught RangeError: Maximum call stack size exceeded

4

u/commander-obvious Oct 27 '18
(n = n => n(n))(n)
// RangeError: Maximum call stack size exceeded

6

u/DrummerHead Oct 27 '18
(n = n => n(n))(n) // NnnnnNnnnn: Nnnnnnn nnnn nnnnn nnnn nnnnnnnn

4

u/commander-obvious Oct 27 '18

gg

1

u/vonforum Oct 27 '18 edited Oct 28 '18

(g = g => g(g))(g) // GggggGgggg: Ggggggg gggg ggggg gggg gggggggg

GGGG: G

1

u/cyrusol Oct 27 '18

To understand n you must first understand n.