stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
JavaScript Camp Day 4/5 Flashcards | StudBud
Explore
/
JavaScript Camp Day 4/5
JavaScript Camp Day 4/5
20 terms
·
StudBud Administration
·
24 plays
CN JavaScript Camp for Days 4 and 5
Flashcards
20 cards
F
Practice quiz
P
Host live
L
Questions
20
Answers
1
What do we use to change the location of an object?
changePosition()
setLocation()
setPosition()
changeLocation()
2
How would you set the current screen to the win screen?
setScreen(winscreen)
setScreen(winScreen);
setScreen("winScreen")
setScreen("winScreen");
3
When would you use a boolean variable?
When you want to store a word
When something is either true or false
When you want to store a number
When you have two options
4
True or False: A button can only move one object at a time
True
False
5
True or False: Most programming languages use the same basic concepts
False
True
6
How can you decrease the health by one?
health -
health = health = 1;
health --
health -= 1;
7
True or False: The same variable can have two different names
True
False
8
Which one of these would give us a random number from zero to twenty?
rand(0, 20);
random(0, 20);
randomNumber(0, 20);
number(0, 20);
9
True or False: You should put numbers in quotes when you assign them to a string variable
True
False
10
True or False: If-Statements are a type of loop
True
False
11
True or False: Code Ninjas is awesome!
True but in Red
True
True but in Blue
True but in Green
12
True or False: Two variables can have the same name
False
True
13
If we want to say something is greater than or equal to, we use
=<
<=
>=
=>
14
True or False: A label changes automatically when the variable it displays changes
True
False
15
When would you use an integer variable?
When you are keeping track of your height
When you are keeping track of names
When you are keeping track of the number of goals scored
When you are keeping track of how much money you have
16
What is the name of the button that moves our objects around?
shuffleButton
shufflebutton
btnShuffle
shuffle
17
True or False: You can copy and paste code
False
True
18
What did we have to do to our health variable before we used it?
Think of a name for it
Tell the computer that we were going to use it
Declare it
Declare it and set it to zero
19
True or False: You must create a function earlier in the code than you call it
False
True
20
True or False: A variable will not work unless you use camel case
True
False