¿Qué es un CLOSURE?

JavaScriptAvanzado-II

Quiz
•
Fun, Education
•
1st - 12th Grade
•
Medium
Viviana Cruz
Used 10+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
una funcion que retorna otra funcion
una funcion que retorna otra funcion y que usa una variable definida en el scope de la funcion que la retornó
una variable que dentro del scope de una funcion retornada por otra funcion
es un mito de JavaScript
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
¿En qué momento pasa una función que está en el event queue al execution stack?
cuando pasa una determinada cantidad de tiempo.
cuando el execution stack esta vacio.
no se puede predecir el momento.
cuando el servicio ecterno termina de ejecutar el callback.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
¿En qué orden van a salir los outputs?
setTimeOut(function() {
console.log('uno');
}, 1000);
setTimeOut(function() {
console.log('dos');
}, 1500);
setTimeOut(function() {
console.log('tres');
}, 0);
console.log('cuatro');
cuatro uno dos tres
uno dos tres cuatro
tres dos uno cuatro
cuatro tres uno dos
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
La diferencia entre 'call' y 'bind' es que:
Bind retorna una nueva funcion, call invoca la funcion
Call cambia el valor del this, y bind no
no hay diferencia
los argumentos que reciben
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
En JavaScript podemos controlar el valor del keyword this de manera arbitraria.
Verdadero
Falso
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
En el código siguiente, qué variable quedaría en un CLOSURE al invocar `makeAdder`?
function makeAdder(x) {
return function(y) {
return x + y;
}
}
var add5 = makeAdder(5);
var add10 = makeAdder(10);
y
no hay closure
x
x e y
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
La diferencia entre `call` y `apply` es:
los parametros que reciben
una retorna una funcion nueva y otraa la invoca
la forma en que cambian el this
no hay ninguna diferencia
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Con la función _____ podemos forzar el valor de la variable this.
console.log
bind
this
new
Similar Resources on Quizizz
10 questions
Integracion hombre-empresa1.

Quiz
•
1st Grade
10 questions
Diagnóstico Programación

Quiz
•
11th - 12th Grade
10 questions
CENTRO DE CONCILIACION

Quiz
•
1st Grade
10 questions
Examen final de Lengua Española para primero

Quiz
•
1st Grade
8 questions
La semantica

Quiz
•
5th Grade
11 questions
CONCURSO DE CONOCIMIENTOS

Quiz
•
9th - 12th Grade
10 questions
Toma Salami Punto Com

Quiz
•
1st Grade
10 questions
EXCEL

Quiz
•
1st - 5th Grade
Popular Resources on Quizizz
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade
Discover more resources for Fun
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade