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

Descrição

Quiz sobre 2) JavaScript - Programming Fundamentals (Checkpoints 11-17), criado por Sanny Lin em 24-03-2016.
Sanny Lin
Quiz por Sanny Lin, atualizado more than 1 year ago
Sanny Lin
Criado por Sanny Lin mais de 8 anos atrás
26
1

Resumo de Recurso

Questão 1

Questão
What is (6 * 4 + 7) % 3?
Responda
  • 1
  • 3
  • 10
  • 28

Questão 2

Questão
Which string will throw an error?
Responda
  • '"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.'

Questão 3

Questão
True or false: 10 % 3 == true
Responda
  • True
  • False

Questão 4

Questão
True or false: (22 - 6 * 2) % 5 === false
Responda
  • True
  • False

Questão 5

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

Questão 6

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

Questão 7

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

Questão 8

Questão
Which methods *add* elements to an array? (select all that apply)
Responda
  • push()
  • unshift()
  • pop()
  • shift()

Questão 9

Questão
We use a `for` loop when...
Responda
  • 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

Questão 10

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

Questão 11

Questão
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);​
Responda
  • 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

Semelhante

Figuras de Linguagem
Mah1408
Quiz Sobre Genética
Marerodrigues
Aprenda a fazer uma boa Redação para concursos Públicos em 5 passos
Alessandra S.
ADJETIVOS
Viviana Veloso
PSICOLOGIA DO DESENVOLVIMENTO E DA APRENDIZAGEM
vanessasenez
Resumo de Biologia - Ciclos da Vida e Evolução
Larissa Guimarães
Capitais do Mundo e curiosidades
Luiz Fernando
QG Concursos - simulado Polícia Civil/SP 100 questões (06/08/2015)
mediugorie
Por que 8 de março é o Dia Internacional da Mulher?
GoConqr suporte .
Ecologia
Hugo Fonseca