Information that you specify in a function definition are called _____.
Parameters
Creating a variable in JavaScript is called ____
Declaring a variable
What kind of loop repeats a set number of times?
For Loop
What part of an if-statement runs when the condition is false?
else block
How do you comment in javascript?
// for one line, /* */ for multiple lines
What do we call the result that a function returns?
Return Value
To declare a variable, use keyword "___"
var
What happens if the condition in a while loop never becomes false?
It keeps running (infinite loop)
What statement can we use to make decisions in our code?
Conditional / If statement
What kind of variable can store many values at once?
Array
What do we need to do to make the function run?
Call the function
What is the variable type that is used to store words or text called?
String
What part of a loop updates the number each time it runs?
Increment or decrement
What keyword starts a conditional statement in JavaScript?
if
What does DOM stand for in JavaScript?
Document Object Model
What is the keyword used to define a new function called?
function
What is the type of variable used to store values like true or false called?
Boolean
What type of loop keeps running as long as a condition is true?
While Loop
What keyword lets you check another condition if the first one is false?
else if
What will this code print?
function Dog(nameParam) {
this.name = nameParam;
}
Dog.prototype.bark = function () {
console.log("Woof!");
};
dog= new Dog("Dom")
dog.bark();
Woof!
What will this return?
function multFive(number) {
return number * 5;
}
var x = 4;
var result = multFive(x);
console.log(result);
20
What is the value of z:
var x = 3; var y = 7; var z = x + y;
10
What numbers will appear when this code runs?
for (var i = 1; i <= 3; i++) {
console.log(i);
}
1
2
3
What is the output of this code?
var score = 3;
if (score === 5) {
alert("Perfect!");
} else {
alert("Try again!");
}
Try again!