JavaScript_advanced Flashcards

1
Q

What does the new operator do?

A

The new operator creates a blank javascript object. It also adds the property of the new object (__proto__) that links to the constructor function’s prototype object.

Binds the newly created object instance as the this context (i.e. all references to this in the constructor function now refer to the object created in the first step).

Returns this if the function doesn’t return an object.

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

What property of JavaScript functions can store shared behavior for instances created with new?

A

Adds a property to the new object (__proto__) that links to the constructor function’s prototype object

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

What is a client?

A

a piece of computer hardware or software that accesses a service made available by a server as part of the client–server model of computer networks(users)

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

What is a server?

A

a piece of computer hardware or software (computer program) that provides functionality for other programs or devices

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

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

A

get,post?

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

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

A

An HTTP method,The request target(usually a URL, or the absolute path), The HTTP version

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

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

A

The protocol version, A status code,A status text

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

What are HTTP headers?

A

HTTP headers let the client and the 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
9
Q

Where would you go if you wanted to learn more about a specific HTTP Header?

A

MDN

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

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

A

no

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

What is AJAX?

A

Ajax is a technique for loading data into part of a page without having to refresh the entire page. The data form is often sent in a format called json.

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

What does the AJAX acronym stand for?

A

Asynchronous JavaScript And XML.

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

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

A

XMLHttpRequest object

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

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

A

load

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

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

A

They both inherited from the event target.?

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