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 Wayground
10 questions
CMU Python Intro Flashcard

Flashcard
•
9th - 12th Grade
8 questions
Parent Function Translations

Flashcard
•
9th - 12th Grade
8 questions
Factoring Quadratics Graphically

Flashcard
•
9th - 11th Grade
10 questions
Systems of Equations

Flashcard
•
9th - 12th Grade
10 questions
Identifying Trig Ratios

Flashcard
•
9th - 12th Grade
10 questions
Trig Ratios (Missing Side)

Flashcard
•
9th - 12th Grade
10 questions
Parent Function Translations

Flashcard
•
9th - 12th Grade
4 questions
JavaScript Review 1125

Flashcard
•
9th - 12th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade
Discover more resources for Computers
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade