JS Web Development Flashcards

1
Q

What is JSON?

A

a universally readable data interchange format that follows JavaScript object syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are serialization and deserialization?

A

serialization: converting an object into a string
deserialization: turning the string back into the same object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why are serialization and deserialization useful?

A

useful because they let you send data in a universally readable format

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you serialize a data structure into a JSON string using JavaScript?

A

JSON.stringify()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you deserialize a JSON string into a data structure using JavaScript?

A

JSON.parse()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a client?

A

The application that is requesting a service or function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a server?

A

The application that is providing a service or resource

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which HTTP method does a browser issue to a web server when you visit a URL?

A

GET

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What three things are on the start-line of an HTTP request message?

A
  1. The HTTP method (ex. GET, POST, DELETE, PUT, etc)
  2. Request target (a url including any query string)
  3. The HTTP version
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What three things are on the start-line (aka status line) of an HTTP response message?

A
  1. The protocol version
  2. A status code/response code indicating success or failure of request (ex 200, 404)
  3. A status text; a brief human-readable description of status code (ex. ‘Not Found’, ‘OK’)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are HTTP headers?

A

HTTP headers let the client or server pass additional information with an HTTP request or response.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Is a body required for a valid HTTP request or response message?

A

No, the message body is optional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is AJAX?

A

Anything that makes a request to an outside source and then updates a web page after it has been loaded.

Ajax allows you to request data from a server and load it without having to refresh page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the AJAX acronym stand for?

A

Asynchronous Javascript and XML

This is what the letters literally stand for; but the term AJAX as it’s used today does not specifically mean this.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which object is built into the browser for making HTTP requests(network requests) in JavaScript?

A

The XMLHttpRequest object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What event is fired by XMLHttpRequest objects when they are finished loading the data from the server?

A

The load event

17
Q

An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?

A

Both DOM elements and the XMLHttpRequest object inherit this method through prototypal inheritance from the EventTarget object