exam questions

Exam 70-480 All Questions

View all questions & answers for the 70-480 exam

Exam 70-480 topic 3 question 40 discussion

Actual exam question from Microsoft's 70-480
Question #: 40
Topic #: 3
[All 70-480 Questions]

You are creating a web page that contains a canvas with text.
The page contains the following JavaScript code. (Line numbers are included for reference only.)

The text on the canvas must rotate 90 degrees when a user clicks a button on the page.
You need to ensure that the text rotates when the user clicks the button.
Which line of code should you add at line 03?

  • A. context.transform(90);
  • B. context.content.getRotation(90);
  • C. context.rotate(90);
  • D. context.content.rotate (90);
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
The rotate() method rotates the current drawing.

Example -
Rotate the rectangle 20 degrees:
JavaScript:
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.rotate(20*Math.PI/180);
ctx.fillRect(50,20,100,50);
Reference: HTML canvas rotate() Method

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
dr_0verboost
4 years, 8 months ago
C is the correct answer
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...