100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CodeHS Unit Four JavaScript & Graphics Questions and Answers Latest Update Already Passed

Rating
-
Sold
-
Pages
18
Grade
A+
Uploaded on
20-02-2025
Written in
2024/2025

CodeHS Unit Four JavaScript & Graphics Questions and Answers Latest Update Already Passed How do you create a circle in JavaScript graphics? Use new Circle() with a specified radius. How can you set the color of a shape? Use setColor() with a color name or hex code. Which command adds a shape to the canvas? add() How do you remove an object from the canvas? Use remove(). How can you make a rectangle in JavaScript graphics? Use new Rectangle() with width and height. 2 How do you draw a line between two points? Use new Line() with starting and ending coordinates. How can you make text appear on the canvas? Use new Text() with the message and font size. Which method is used to change the position of an object? setPosition() How do you make an object move smoothly across the screen? Use a while loop with move(). How can you change the background color of the canvas? Use setBackgroundColor(). How do you make an object visible after hiding it? Use add() again to add it back to the canvas. 3 Which command is used to draw an oval? Use new Oval() with width and height. How can you change the font size of displayed text? Use setFont() with the desired size. How do you make an object move up the screen? Use move(0, -distance). How can you create a gradient effect? Overlay semi-transparent shapes with different colors. How do you check if two objects are touching? Use getX() and getY() to compare positions. Which method changes the size of a shape? Use setSize() or setRadius() for circles. 4 How can you rotate a shape on the canvas? It's not directly supported; simulate by moving points. How do you make a bouncing animation? Use a loop to reverse direction when hitting canvas edges. How can you make an object disappear temporarily?

Show more Read less
Institution
CodeHS Unit Four JavaScript & Graphics
Module
CodeHS Unit Four JavaScript & Graphics










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CodeHS Unit Four JavaScript & Graphics
Module
CodeHS Unit Four JavaScript & Graphics

Document information

Uploaded on
February 20, 2025
Number of pages
18
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CodeHS Unit Four JavaScript &
Graphics Questions and Answers Latest
Update Already Passed
How do you create a circle in JavaScript graphics?


✔✔ Use new Circle() with a specified radius.




How can you set the color of a shape?


✔✔ Use setColor() with a color name or hex code.




Which command adds a shape to the canvas?


✔✔ add()




How do you remove an object from the canvas?


✔✔ Use remove().




How can you make a rectangle in JavaScript graphics?


✔✔ Use new Rectangle() with width and height.




1

,How do you draw a line between two points?


✔✔ Use new Line() with starting and ending coordinates.




How can you make text appear on the canvas?


✔✔ Use new Text() with the message and font size.




Which method is used to change the position of an object?


✔✔ setPosition()




How do you make an object move smoothly across the screen?


✔✔ Use a while loop with move().




How can you change the background color of the canvas?


✔✔ Use setBackgroundColor().




How do you make an object visible after hiding it?


✔✔ Use add() again to add it back to the canvas.




2

, Which command is used to draw an oval?


✔✔ Use new Oval() with width and height.




How can you change the font size of displayed text?


✔✔ Use setFont() with the desired size.




How do you make an object move up the screen?


✔✔ Use move(0, -distance).




How can you create a gradient effect?


✔✔ Overlay semi-transparent shapes with different colors.




How do you check if two objects are touching?


✔✔ Use getX() and getY() to compare positions.




Which method changes the size of a shape?


✔✔ Use setSize() or setRadius() for circles.




3
£7.69
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Also available in package deal

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
BrilliantScores Chamberlain College Of Nursng
Follow You need to be logged in order to follow users or courses
Sold
2817
Member since
3 year
Number of followers
2232
Documents
16100
Last sold
3 days ago
latest updated documents, correct, verified & graded A study materials

get bundles, documents, test banks, case studies, shadow health's, ATIs, HESIs, study guides, summary, assignments & every kind of study materials.

3.8

774 reviews

5
388
4
117
3
116
2
37
1
116

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions