Var fizz;
Var bop;
Bop = 10;
Fizz = 20;
Bop = bop + 30;
Fizz = bop;
console.log(bop + fizz)
What's the output?
80
What is a conditional statement?
-Affects the sequential flow of control by executing different statements based on the value of a Boolean expression.
Which of the following is true of functions?
A. Programs written with functions run more quickly
B. Functions can help remove repeated code from a program
C. Replacing repeated code with a function will reduce the number of commands the computer needs to run
D. Functions are called once but can be declared many times
B.
On July 20, 1969, Neil Armstrong became the first person in history to do what?
Walk on the moon
Var oop;
oop = 10;
oop = oop + 10;
oop = oop + 5;
oop = oop + 7;
console.log(oop);
What's the output?
32
Var score = 50;
Score = score * 10;
Score = score + 100;
Score = score - 500;
If (score < 100){
console.log(“less than 100”);
}
Else if (score < 200){
console.log(“less than 200”);
}
Else if (score < 300{
Console.log (“less than 300”);
}
Else{
console.log(“300 or more”)
}
What's the output?
“less than 200”
pizza();
Which NBA team plays its home games at Madison Square Garden?
Var cantrell;
Var pizza;
cantrell = 20;
pizza = 100;
cantrell = pizza + 5;
pizza = cantrell + 8;
console.log(pizza);
What's the output?
113
Var age = 20;
Var day = Saturday;
if(age > 15) && (day == “Friday”)) {
console.log(“Output A”);
}
Else if ((age > 15) || (day == “Friday”)){
console.log(“Output B”);
}
Else if ((age < 15) && (day == “Sunday”)){
console.log(“Output C”);
}
Else if ((age < 15) || (day == “Sunday”)){
console.log(“Output D”);
}
Else{
console.log(“Output E”);
}
What's the output?
Output B
What is the output?
console.log(“CSP”);
letters();
letters();
letters();
Function letters(){
console.log(“b”);
console.log(“c”);
}
CSP bcbcbc
What's the name of the pig in the book “Charlotte's Web”?
Wilbur
“Hello” never displays. Which line of code is responsible for this error?
What is the error?
Var score = 2;
onEvent(“button1”, “click”, function (){
Var score = 0;
If (score > 5){
setText(“display”, “Hello”);
score++;
}
});
Var score = 0, you don't want to declare the variable score twice, also resetting it to 0 each time will make it impossible to exceed 5
Var age = 2;
Var day = "Sunday";
if(age > 15) && (day == “Friday”)) {
console.log(“Output A”);
}
Else if ((age > 15) || (day == “Friday”)){
console.log(“Output B”);
}
Else if ((age < 15) && (day == “Sunday”)){
console.log(“Output C”);
}
Else if ((age < 15) || (day == “Sunday”)){
console.log(“Output D”);
}
Else{
console.log(“Output E”);
}
What's the output?
Output C
What is the difference between a function definition and a function call?
A function call allows you to use the function, a function definition has the body of code that creates the function
Pommes frites is the French term for what popular American side dish?
French Fries
What are at least 3 rules for creating variables in Javascript?
Answers May Vary,
You can't have spaces, you can't start with a number, you should CamelCase if there's multiple words, Other answers may be acceptable
What is the correct conditional statement to check to see if a variable called n is an even number?
if (n % 2 == 0){
console.log("it is an even number")
}
var count = 0;
function increment() {
count = count + 2;
console.log("Count is now: " + count);
}
increment();
increment();
console.log("Final count: " + count);
What is printed?
Count is now: 2
Count is now: 4
Final count: 4
Originally, Amazon only sold what kind of product?
Books