
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
8 questions
Medical abbreviations

Flashcard
•
12th Grade
4 questions
JavaScript Review 1125

Flashcard
•
9th - 12th Grade
15 questions
AP Calculus AB Final Exam Fall 2024

Flashcard
•
9th - 12th Grade
15 questions
Slope Fields (warm-up 2 #6-10)

Flashcard
•
10th Grade - University
15 questions
Volume AP Calculus

Flashcard
•
9th - 12th Grade
15 questions
HW-Average Value of a Function

Flashcard
•
10th - 12th Grade
15 questions
Derivatives: Product, Quotient & Chain Rule

Flashcard
•
9th - 12th Grade
14 questions
Precal Unit 3 and 4 MK

Flashcard
•
10th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
CTEA Computer Vocab Terms #1

Quiz
•
12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade