Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Submit quiz 9
Browse files Browse the repository at this point in the history
  • Loading branch information
hanggrian committed Nov 10, 2023
1 parent 33baf82 commit d3ca032
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions assignments/quiz9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<style type="text/css">ol { list-style-type: upper-alpha; }</style>

# Quiz 9

## Problem 1

> Which Web API can be used to determine if an element is visible in the
viewport?
>
> 1. Intersection Observer API
> 2. Geolocation API
> 3. Media Query API
> 4. Object Visiblity API
**A**. Intersection Observer API

## Problem 2

> The File Access API lets you read any file on a user's computer.
>
> 1. True
> 2. False
**B**. False

## Problem 3

> Canvas API is a vector drawing API
>
> 1. True
> 2. False
**B**. False

## Problem 4

> Where is the (0, 0) point on the HTML Canvas API by default?
>
> 1. top right
> 2. bottom left
> 3. top left
> 4. bottom right
**C**. top left

## Problem 5

> Which HTML Canvas API path method did I use to draw a circle in class?
>
> 1. bezierCurveTo
> 2. arc
> 3. circle
> 4. arcTo
**B**. arc

## Problem 6

> Fill or stroke style must be set before you call any drawing commands on the
context.
>
> 1. True
> 2. False
**A**. True

## Problem 7

> What is not true about the Indexed DB API?
>
> 1. Store and retrieve data based on keys
> 2. non-sal based
> 3. Asynchronous API
> 4. Can only store strings
**D**. Can only store strings

## Problem 8

> What shape will the following code create?
>
> ```js
> cx.fillStyle = rgb(233,233,233);
> cx.beginPath();
> cx.moveTo(50, 10);
> cx.lineTo(10, 70);
> cx.lineTo(90, 70);
> cx.fill();
> ```
>
> 1. A red rectangle
> 2. A red square
> 3. A white triangle
> 4. A gray triangle
**D**. A gray triangle

0 comments on commit d3ca032

Please sign in to comment.