際際滷

際際滷Share a Scribd company logo
Event Loops in JavaScript
neoelemento.com
printResult(add(3, 2));
function printAdd(x, y) {
var result = add(x, y);
console.log(result);
}
function add(a, b) {
return a + b;
}
main()
printResult(3, 2);
function printAdd(x, y) {
var result = add(x, y);
console.log(result);
}
function add(a, b) {
return a + b;
}
main()
printResult(3, 2)
printResult(3, 2);
function printAdd(x, y) {
var result = add(x, y);
console.log(result);
}
function add(a, b) {
return a + b;
}
main()
printResult(3, 2)
add(3, 2)
Stack
printResult(3, 2);
function printAdd(x, y) {
var result = add(x, y);
console.log(result);
}
function add(a, b) {
return a + b;
}
main()
printResult(3, 2)
Stack
printResult(3, 2);
function printAdd(x, y) {
var result = add(x, y);
console.log(result);
}
function add(a, b) {
return a + b;
}
main()
Stack
function hi() {
hi();
}
main()
Stack
RangeError: Maximum call stack size exceeded
Stackoverflow!
hi()
hi()
hi()
hi()
hi()

More Related Content

Event loops in java script 01 - stack