Classes & Objects
Data & JSON
Events & Handlers
JavaScript APIs
App State & Storage
100

What keyword creates a class in JavaScript?

class

100

What does JSON stand for?

JavaScript Object Notation

100

What method attaches an event listener to an element?

addEventListener()

100

What does API stand for?

Application Programming Interface

100

Which storage keeps data even after the browser is closed?

localStorage

200

What is the special method that initializes new objects in a class

constructor

200

Which built-in method converts a JSON string to a JavaScript object?

JSON.parse()

200

What event type fires when a button is pressed with the mouse?

"click"

200

Which browser API gets the user’s current geographic location (with permission)?

Geolocation API

200

Which storage is cleared when the browser tab is closed?

sessionStorage

300

What keyword is used to create an instance (object) from a class?

new

300

Which built-in method converts a JavaScript object to a JSON string?

JSON.stringify()

300

What event type fires when a key is pressed down on the keyboard?

"keydown"

300

Which API works with the browser’s local database of key/value pairs for a site?

Web Storage API (localStorage / sessionStorage)

300

What method stores a value in localStorage?

localStorage.setItem(key, value)

400

The variables inside a class that belong to each object are called what?

Properties / fields

400

Why is JSON commonly used with web APIs?

It’s lightweight, easy for humans to read, and easy for programs to parse

400

What is an event handler?

A function that runs in response to an event

400

Why are charting APIs or libraries useful?

They make it easier to display data as charts and graphs without writing all the drawing code

400

What method gets a value from localStorage?

localStorage.getItem(key)

500

What is inheritance in classes?

When one class extends another and gains its properties and methods

500

Which two data formats are commonly mentioned for exchanging app data?

JSON and XML

500

What is event bubbling?

When an event starts at the target element and propagates up through ancestor elements

500

What does the Fetch API do?

Lets you make network requests (like HTTP) from JavaScript

500

Which type of data is best for local/session storage: raw objects or strings?

Strings (often JSON strings of objects)

M
e
n
u