Intro to programming and variables | Binary and operations | Loops and arrays | Functions and objects | Conditional statements and user interaction |
---|---|---|---|---|
program
What is a group of instructions that a computer follows?
|
+, -, *,/
What are the four math operators we learned?
|
infinite
How many times will
while(true){ alert("hello"); } Pop up with hello? |
function name(parameter){
//code }
How do you create a function?
|
Make a pop up on the screen
what does an alert do
|
How is a header tag defined? (Opening and closing)
|
Zeroes and ones
What makes up binary numbers?
|
true
The condition must be ______ for the code block to execute.
|
Functionname( );
How do you call a function?
|
false
An else statement code block will only run if the if statement condition is
|
//comment
/* Comment */
How do you write the two different types of comments in JavaScript?
|
Byte
8 bits makes a _________.
|
twice
How many times will this for loop execute?
for(var i= 0; i <2; i++) |
var name = new Object( );
How do you initialize an object
|
<, >, ==, <=,>=, !=, &&,
What are the logical operators
|
Console.log( );
What JavaScript statement will print out to the console?
|
100110010
What is..
10010001 +10100001 |
1
What is index in the array is cat?
var animals = [dog, cat, ardvark, fish]; |
Fred.name = "Fred";
Add the property name = Fred to object Fred
|
Console.log( );
What JavaScript statement do you have to click F12 to view what prints out? (Or right click inspect)
|
Type, name, value
What are the three parts to a variable? Give an example with an integer
|
2
The way we count (1,2,3,4..,10) is base ten.
So binary is base ...? |
var numbers = [1,2,3,4,5];
Define an array numbers with the numbers 1-5.
|
function greeting(hello){
alert(hello); } greeting("hello");
Write and call a function with the called greeting that has an alert for its the parameter "hello"
|
if(condition){
}else if(condition){ } else { }
Write an if, else if, and else statement
|