Github
Variables and Arrays
IF you like conditionals, pick me!
Loops, Loops, and More Loops!
100

What is Github?

What is a web-based service used for hosting git projects?

100

What is a variable?

What is a storage container for some piece of info (number, letter, word)?

100

What is the purpose of an IF statement?

What is to allow code to respond differently to different situations (or conditions)

100

What are loops used for in programming?

What is to repeat blocks of code?

200

What is the difference between Git and Github?

What is "Git is version control system that tracks a project's history, while Github is a platform that stores projects that uses Git". 

Remember: Git is the tool and Github is the storage space.

200

What is an array?

What is a list that stores multiple pieces of information?

200
What is the symbol for "OR"?

What is "||"?

200

What are the 4 ingredients to any loop?

What are: (1) Starting condition, (2) Stopping condition, (3) Repeating block of code, (4) Incrementation (Getting closer to the stopping condition.)

300

What github command do we use to "add" in project changes?

What is "git add --all"?

300

What is the difference between a "string" and a variable?

What is "a 'string' is something we use to represent text, while a variable is a container used to represent a certain value"?

300

What would Javascript print?

var myAge = 20;

if (myAge > 18) {

console.log("Old enough!");

}

console.log("Mehh!");

What is: 

Old enough!

Mehh!

300

What are the 4 different types of loops we can have in Javascript?

What are: for, for/in, while, do/while?

400

What Github command do we use to save/"commit" changes in Github?

What is "git commit"?

400

String or Array:

var thing = ['what', 'is', 'this?']

What is an array? (This is an array, or a list, that stores a bunch of strings. The whole thing is an array, while each 'item' is a string.)

400

True or False: (3 < 2) || (3 == 3)

What is true? 


The statement can be rewritten as: false || true

The statement on the right is true, which means the whole statement true. 


400

What's wrong with the following code?


var i = 0;

var j = 0;

while(i < 5){

    j++;

}

i++;

console.log("j is " + j);

What is we have an infinite loop? (The variable 'i' is never changing, so it never gets to 5.)

500

Give me the correct order of commands:

git commit -m "Random comment"

git push origin master

git add --all

What is:

1.) git add --all

2.) git commit -m "Random comment"

3.) git push origin master

500

What is my resulting list?


start empty list

set b to 2

Repeat 4 times{

Add 3 to b

Insert b in the list

}

print list


What is [5, 8, 11, 14]?

500

What will Javascript print?


var x = 3;

function bar() {

  if (x <= 4) {

    console.log("man");

  }

  else {

    console.log("xyzzy");

  }

}


bar();

x++;   // This means "x = x + 1"

bar();

x++;   // This means "x = x + 1"

bar();

What is:

man

man

xyzzy

500

What will Javascript print?

var numbers = [89, 23, 44];

for (index in numbers){

    console.log(index);

}


What is: 

0

1

2

(Note: 'index' takes on the index of every item in the array. Thus, since the array has 3 items in it, index becomes 0, 1, then 2.)

M
e
n
u