JavaScript Animation Quiz

JavaScript Animation Quiz

7th Grade

10 Qs

quiz-placeholder

Similar activities

AES MS Word Essentials 1

AES MS Word Essentials 1

7th - 8th Grade

12 Qs

HTML Review

HTML Review

5th - 12th Grade

12 Qs

Scratch Unit 4 Vocab

Scratch Unit 4 Vocab

7th - 8th Grade

11 Qs

Python Turtle

Python Turtle

KG - Professional Development

11 Qs

Google Draw

Google Draw

7th - 8th Grade

9 Qs

Python Basic Unit 1

Python Basic Unit 1

7th - 8th Grade

14 Qs

Flowcharting

Flowcharting

6th - 11th Grade

10 Qs

Scratch

Scratch

6th - 7th Grade

15 Qs

JavaScript Animation Quiz

JavaScript Animation Quiz

Assessment

Quiz

Computers

7th Grade

Hard

Created by

Asfia Asif

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the myMove() function do in the given code?

Changes the background color of the container

Moves the red box diagonally across the container

Resizes the red box continuously

Rotates the container

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of clearInterval(id) at the start of the myMove() function?

It resets the box position to the starting point.

It stops any previously running animations to prevent overlap.

It deletes the animation element from the DOM.

It slows down the animation speed.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when the pos variable reaches 350 in the frame() function?

The animation continues but slows down.

The animation resets back to the start.

The animation stops moving the box.

The box changes color.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to repeatedly execute the frame() function?

setTimeout()

setInterval()

requestAnimationFrame()

runInterval()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How often does the frame() function execute?

Every 5 milliseconds

Every 10 milliseconds

Every 50 milliseconds

Every 100 milliseconds

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following line of code do? elem.style.left = pos + 'px';

Moves the element vertically down by pos pixels.

Moves the element horizontally to the right by pos pixels.

Increases the size of the element by pos pixels.

Rotates the element to the right by pos degrees.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which CSS property allows the red box to move inside the container?

float: left;

position: absolute;

display: block;

align-items: center;

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?