In the ctx.rect shape, which property of the shape is variable?

JavaScript Canvas Review 2

Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

5 questions
Show all answers
1.
FLASHCARD QUESTION
Front
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 Quizizz
8 questions
Ending Sounds

Flashcard
•
KG
10 questions
Dimensional Analysis Review

Flashcard
•
9th - 12th Grade
10 questions
Ending Sounds

Flashcard
•
KG
9 questions
Differentiation of Logarithmic and Exponential Functions

Flashcard
•
11th Grade - University
10 questions
Translations of Quadratic Functions

Flashcard
•
9th - 12th Grade
3 questions
JavaScript drawing skills

Flashcard
•
9th - 12th Grade
8 questions
dandys world

Flashcard
•
KG
4 questions
Rational Equations

Flashcard
•
KG - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University