iteration
True or False: Most developers work independently with no help or collaboration
False
What does this log?
var a = 2;
a = a + 3;
console.log(a);
5
How do you declare a variable called car?
var car;
Why should you run your code often?
To catch mistakes/ errors
What are the two types of loops you've learned about?
for and while
Comment
What does this log?
var name = "Sam";
console.log("Hi " + name);
Hi Sam
Write code that prints the word "Done!" to the screen.
println("Done!");
OR
console.log("Done!");
Why should you indent your code appropriately?
Makes it easier to read
How many times does this loop run?
for (var i = 1; i <= 4; i++) {
println(i);
}
4 times
explain or describe
What does this log?
var color = "red";
console.log("The sky is " +color + "!");
The sky is red!
Declare a variable named i and initialize it with a value of 0.
var i = 0;
What is the best name for a variable that stores weight of your pet dog. x, dog, or dogWeight
dogWeight
What is the output?
var x = 0;
while (x < 2) {
console.log("Hi");
x++;
}
Hi
Hi
What does API stand for?
Application Programming Interface
What does this log?
for(var i=0; i< 3; i++){
console.log("uno");
}
uno
uno
uno
How do you increment the value of variable count?
count++;
Every opening bracket should also have a corresponding
closing bracket
What is the output?
for (var i = 0; i < 3; i++) {
console.log(i);
}
0
1
2
Programming where two developers share ideas and work side-by-side is?
pair-programming
What's the output
var javascript = "programming";
println(javascript + " is fun");
programing is fun
Initialize and empty array called shoppingList
var shoppingList = [];
If a comment takes up multiple lines it's best to use what symbols for the comment?
/* comment here */