What country is Jake in right now?
What is Korea
What symbols should go around words to make them into a string?
" " (Quotes)
What symbol is used to multiply (for example, a multiplied by b)
a * b
What are the 2 possible boolean values
True, False
if (condition) {
code
}
This keyword is used to create a variable in JavaScript
what is "var"
How do you get the length of a string
s.length
Describe a way to increase a variable "count" by 1
count++
count+= 1
count = count + 1
!(a == b)
What will the following statement print?
If (true) {print("Hello ")}
If (13 != 12) {print("World")}
else {print("!")}
Hello World
Name one industry that is not "tech" where programming is used
There's a lot :)
What is the index of the "w" in "Hello world!"
6
What symbol is used to get the remainder of a division operation?
% (modulo)
What symbol(s) can I use to return true if 2 boolean expressions are true, and false otherwise
&&
What will the following statement print?
if (1 == 1) {print("Hello")}
else if (true) {print("World")}
if (false) {print("!")}
"Hello"
What is one thing that a software engineer does at work that is not writing code
*Instructor will grade this answer*
What function is used to get the index of the first occurrence of a character in a string?
.indexOf(character)
What operation is used to round a number up to the nearest whole number
What expression could I use to return true if number n is less than number a but greater than number b
n < a && n > b
How many else ifs am I allowed to add after an if statement
There is (technically) no limit
Explain why the number of likes and views on youtube videos changes so much when you're looking at it (We watched a video about this)
*Instructor will grade this answer*
What function call would I use to get only the "name" out of var s = "My name is James"
s.slice(3, 7)
What expression could I use to get a random whole number between 1 and 100
Math.floor(Math.random() * 100 + 1)
Write an expression to return true if variables a and b are both true, or return true if variables c and d are both true and variable a is false
(a && b) || (c && d && !a)
(There are other ways to do this too)
x = 0
if (x) {x += 1}
if (!x) {x += 5}
else if (x > -1) {x += 10}
else {x = 99}
11