
JavaScript Canvas Review 2
Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

5 questions
Show all answers
1.
FLASHCARD QUESTION
Front
In the ctx.rect shape, which property of the shape is variable?
Back
Width of the rectangle
2.
FLASHCARD QUESTION
Front
If you want the rectangle to move horizontally, which of its properties should be equal to the variable x? Options: x, y, width, height
Back
x
3.
FLASHCARD QUESTION
Front
You are creating a drawing on a Canvas using JavaScript. You want to draw a circle. If your context is ctx, what method would you call to draw a circle?
Back
ctx.arc(x, y, radius, startAngle, endAngle);
4.
FLASHCARD QUESTION
Front
What function do you add to your code to execute the function draw every 20 ms in a JavaScript animation on Canvas? Options: setTimeout(draw, 20), requestAnimationFrame(draw), setInterval(draw, 20), draw();
Back
setInterval(draw, 20)
5.
FLASHCARD QUESTION
Front
What conditional statement do you write to multiply dx by -1 any time x is greater than 250 or less than 50? Options: if (x < 250 && x > 50) { dx *= -1; }, if (x == 250 || x == 50) { dx *= -1; }, if (x >= 250 || x <= 50) { dx *= -1; }, if (x > 250 || x < 50) { dx *= -1; }
Back
if (x > 250 || x < 50) { dx *= -1; }
Similar Resources on Wayground
10 questions
Mastering Indirect Questions Flashcard
Flashcard
•
8th Grade - University
4 questions
K. H, Mácha
Flashcard
•
8th Grade - University
7 questions
Forum Of Female Leaders / Mar '25
Flashcard
•
KG - University
7 questions
CSS Rules Flashcard-unit 4 CodeHS
Flashcard
•
7th Grade - University
9 questions
Patrik test
Flashcard
•
KG
6 questions
Flashcard
Flashcard
•
7th Grade - University
10 questions
คำประสม
Flashcard
•
9th Grade - University
10 questions
Identitas Trigonometri
Flashcard
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
20 questions
Six Weeks Test 2 Review
Lesson
•
9th - 12th Grade
12 questions
Overview of Mexico Part 1
Lesson
•
9th - 12th Grade
16 questions
Lesson 3.5 - If Structures Practice
Quiz
•
11th Grade
10 questions
Exploring Computer Hardware and Software Components
Interactive video
•
6th - 10th Grade