
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
Ending Sounds

Flashcard
•
KG
8 questions
Parent Function Translations

Flashcard
•
9th - 12th Grade
9 questions
Transformations-translations and reflections

Flashcard
•
9th - 12th Grade
10 questions
Geometry Review #1

Flashcard
•
9th - 12th Grade
10 questions
Math Vocabulary

Flashcard
•
9th - 11th Grade
10 questions
Dimensional Analysis Review

Flashcard
•
9th - 12th Grade
10 questions
IB Basic Probability

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

Flashcard
•
KG
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th 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
Introduction to Desktop Computer Systems

Quiz
•
9th - 12th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Computer Hardware and Input/Output Devices

Interactive video
•
6th - 10th Grade