SlideShare a Scribd company logo
1 of 7
Download to read offline
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

What's hot (16)

modern javascript, unobtrusive javascript, jquery
modern javascript, unobtrusive javascript, jquerymodern javascript, unobtrusive javascript, jquery
modern javascript, unobtrusive javascript, jquery
 
Yohan jacobi gaussseidel_analisis
Yohan jacobi gaussseidel_analisisYohan jacobi gaussseidel_analisis
Yohan jacobi gaussseidel_analisis
 
Trabajo
TrabajoTrabajo
Trabajo
 
Practica 4 errores
Practica 4 erroresPractica 4 errores
Practica 4 errores
 
Object Oriented Programing - Generic Programing
Object Oriented Programing - Generic ProgramingObject Oriented Programing - Generic Programing
Object Oriented Programing - Generic Programing
 
Vcs12
Vcs12Vcs12
Vcs12
 
Info clasa
Info clasaInfo clasa
Info clasa
 
9. CodeIgniter add
9. CodeIgniter add9. CodeIgniter add
9. CodeIgniter add
 
Zadatak
ZadatakZadatak
Zadatak
 
Latihan individu
Latihan individuLatihan individu
Latihan individu
 
Los fantastico
Los fantasticoLos fantastico
Los fantastico
 
Kasus 3.3 akar
Kasus 3.3 akarKasus 3.3 akar
Kasus 3.3 akar
 
Infix prefix postfix expression -conversion
Infix  prefix postfix expression -conversionInfix  prefix postfix expression -conversion
Infix prefix postfix expression -conversion
 
C Program : Sorting : Bubble,
C Program : Sorting : Bubble, C Program : Sorting : Bubble,
C Program : Sorting : Bubble,
 
DIBUJO EN JFRAME CASA
DIBUJO EN JFRAME CASADIBUJO EN JFRAME CASA
DIBUJO EN JFRAME CASA
 
[KOSSA] C++ Programming - 14th Study - template
[KOSSA] C++ Programming - 14th Study - template[KOSSA] C++ Programming - 14th Study - template
[KOSSA] C++ Programming - 14th Study - template
 

Viewers also liked

Java Programming: Loops
Java Programming: LoopsJava Programming: Loops
Java Programming: Loops
Karwan Mustafa Kareem
 
Looping statements in Java
Looping statements in JavaLooping statements in Java
Looping statements in Java
Jin Castor
 

Viewers also liked (6)

Loops in JavaScript
Loops in JavaScriptLoops in JavaScript
Loops in JavaScript
 
Java Programming: Loops
Java Programming: LoopsJava Programming: Loops
Java Programming: Loops
 
Loops in java script
Loops in java scriptLoops in java script
Loops in java script
 
Lecture 3 Conditionals, expressions and Variables
Lecture 3   Conditionals, expressions and VariablesLecture 3   Conditionals, expressions and Variables
Lecture 3 Conditionals, expressions and Variables
 
The Loops
The LoopsThe Loops
The Loops
 
Looping statements in Java
Looping statements in JavaLooping statements in Java
Looping statements in Java
 

Event loops in java script 01 - stack