2) JavaScript - Programming Fundamentals (Checkpoints 11-17)

Descripción

Test sobre 2) JavaScript - Programming Fundamentals (Checkpoints 11-17), creado por Sanny Lin el 24/03/2016.
Sanny Lin
Test por Sanny Lin, actualizado hace más de 1 año
Sanny Lin
Creado por Sanny Lin hace más de 8 años
26
1

Resumen del Recurso

Pregunta 1

Pregunta
What is (6 * 4 + 7) % 3?
Respuesta
  • 1
  • 3
  • 10
  • 28

Pregunta 2

Pregunta
Which string will throw an error?
Respuesta
  • '"The best preparation for tomorrow is doing your best today.'"
  • "I believe in living today.\nNot in yesterday, nor in tomorrow."
  • "Nothing is impossible, the word itself says 'I'm possible'!"
  • 'Believe you can and you\'re halfway there.'

Pregunta 3

Pregunta
True or false: 10 % 3 == true
Respuesta
  • True
  • False

Pregunta 4

Pregunta
True or false: (22 - 6 * 2) % 5 === false
Respuesta
  • True
  • False

Pregunta 5

Pregunta
What is the default value of a variable that is not initialized with a value? e.g. `var myVar;` instead of `var myVar = 6;`
Respuesta
  • undefined
  • null
  • 0
  • false

Pregunta 6

Pregunta
function double(x) { return x * 2; } var x = 7; double(5); What is the value of `x` after the above code executes?
Respuesta
  • 2
  • 5
  • 7
  • 14

Pregunta 7

Pregunta
var banana = { color: ""yellow"" } In the above object, `color` is known as a __________. (select all that apply)
Respuesta
  • property
  • tag
  • key
  • value

Pregunta 8

Pregunta
Which methods *add* elements to an array? (select all that apply)
Respuesta
  • push()
  • unshift()
  • pop()
  • shift()

Pregunta 9

Pregunta
We use a `for` loop when...
Respuesta
  • we know the exact number of times to execute a block of code
  • we want to iterate through all enumerable properties
  • we don't know how many times to execute a block of code
  • we want to iterate through all numbered properties

Pregunta 10

Pregunta
Select the correct example of a `for` loop header:
Respuesta
  • (var k = 33; k >= 23; k--)
  • (var i = 0, i < 8, i++)
  • (x = 0; x == 10; x++)
  • (i = 10, i > 1, i - 1)

Pregunta 11

Pregunta
What does this loop do? var array = [3, 4, 6, 23, 23, 9]; var number = 0; for (var i = 0; i < array.length; i++) { if (array[i] > number) { number = array[i]; } } console.log(number);​
Respuesta
  • It finds the largest number in the array
  • It finds the smallest number in the array
  • It does nothing; there is an error in the code
  • It finds if a number occurs more than once in the array
Mostrar resumen completo Ocultar resumen completo

Similar

El Cuerpo Humano: Aparatos y Sistemas
Diego Santos
Esquema resumen de la Prehistoria
Francisco Ayén
LA PERCEPCION
Frank Meza
Clase Invertida paso a paso
Diego Santos
Clasificación de variables
Rober Sanchez
AMBIENTES VIRTUALES DE APRENDIZAJE (AVA)
naansara1993
COMPLEMENTO DIRECTO E INDIRECTO
ROSA MARIA ARRIAGA
Descubre los Grupos Públicos en GoConqr
Laura -
Anatomía Animal (Sistema Óseo)
Ana Favela
KRISTAUTASUNA 6A
Txemi López
Texto Narrativo
Diana Banda