Variables
Conditionals
Functions
Vocab
Random
100

What is a variable?

A named reference to a value that can be used repeatedly throughout a program.

100

What is a Conditional Statement?

Affects the sequential flow of control by executing different statements based on the value of a Boolean expression.

100

What is a Function?

A named group of programming instructions. Also referred to as a “procedure”.

100

What is a string?

An ordered sequence of characters.

100

var awesome="2";

is the value of variable awesome a number or a string?

String

200

What does the variable Likes evaluate to?

var Likes = 0;

Likes = Likes +1;

Likes = 8;




8

200

What does the logical operator "&&" mean?

And

200

What would the console.log read if ONLY function summer was ran?

function spring(){

  console.log("First comes spring, when flowers bloom");

}

function summer(){

  console.log("Summer's sun will follow soon");

}

"Summer's sun will follow soon"

200

What is a comparison operator?

Ex. 

<, >, <=, >=, ==, != 

200

What would the variable myStory evaluate to?

var myString = "rock";

var myOtherString = "roll";

var myStory = myString + " and " + myOtherString;

myStory = "rock and roll"

300

What does the variable myFavoriteFood evaluate to?

var myFavoriteNumber;

var myFavoriteFood;

myFavoriteNumber = 2;

myFavoriteFood = "pie";

"pie"

300

What does the logical operator "||" mean?

Or

300

What would the console log display fi the button was clicked 3 times?

onEvent("button", "click", function( ) {

  birthday();

  console.log("  Happy birthday!");

"  Happy birthday!"

"  Happy birthday!"

"  Happy birthday!"

300

What is a Boolean value?

A data type that is either true or false.

300

Can I adopt a cat?

I can if I have at least $40 and if I am over 14 years old

money = $46 age=12 years

No!

(2 years too young)

400

What would the result of this program be?

var myAge = 14;

console.log("Right now I am");

console.log(myAge);

console.log("years old.");

"Right now I am 14 years old"
400

What does the logical operator "!" mean?

Not

400

Would the program display soldOutLabel? Or be hidden?

tickets = 36 

function soldOut() {

  if(tickets >= 20){

    setProperty("soldOutLabel","hidden",false);

soldOutLabel
400

What is a function call?

A command that executes the code within a function.

400

true && false evaluates to...?

FALSE!

500

What would variable clicks evaluate to after clicking 7 times?

var clicks = 0;

onEvent("addOneButton", "click", function() {  

clicks = clicks + 2; 

clicks = 14

500

Is happiness "High" or "Low"?

happiness = 3;

if (happiness > 5) {

    happinessLevel = "High";

  } else {

    happinessLevel = "Low";

"Low"

500

True or False?

"Functions are an item that can hold one value at a time"

FALSE!

500
What is an expression?

A combination of operators and values that evaluates to a single value

500

What does MOD mean?

the remainder that is left after a number is divided by another number