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

Beschreibung

Quiz am 2) JavaScript - Programming Fundamentals (Checkpoints 11-17), erstellt von Sanny Lin am 24/03/2016.
Sanny Lin
Quiz von Sanny Lin, aktualisiert more than 1 year ago
Sanny Lin
Erstellt von Sanny Lin vor etwa 8 Jahre
26
1

Zusammenfassung der Ressource

Frage 1

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

Frage 2

Frage
Which string will throw an error?
Antworten
  • '"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.'

Frage 3

Frage
True or false: 10 % 3 == true
Antworten
  • True
  • False

Frage 4

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

Frage 5

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

Frage 6

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

Frage 7

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

Frage 8

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

Frage 9

Frage
We use a `for` loop when...
Antworten
  • 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

Frage 10

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

Frage 11

Frage
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);​
Antworten
  • 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
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Fragen die jeder Fünftklässler beantworten kann.
JohannesK
Lern-Fitness-Test aus der Bestnote
Studienstrategie
LEK 1
Max Muster
Flipped Classroom Modell
Laura Overhoff
Das GoConqr Quiz-Tool
Laura Overhoff
FOST 2 Deskriptive und explorative Datenanalyse
Kathy H
Marketing
Sabrina Heckler
PuKW STEP6 - Hummel
Salome Jeong
MEWA
Kathi P
Vetie Radiologie Übungsfrage
Carolina Heide
GESKO A PR WS 2018/19
Caroline Hannah