JavaScript_advanced Flashcards
What does the new operator do?
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.
What property of JavaScript functions can store shared behavior for instances created with new?
Adds a property to the new object (__proto__) that links to the constructor function’s prototype object
What is a client?
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)
What is a server?
a piece of computer hardware or software (computer program) that provides functionality for other programs or devices
Which HTTP method does a browser issue to a web server when you visit a URL?
get,post?
What three things are on the start-line of an HTTP request message?
An HTTP method,The request target(usually a URL, or the absolute path), The HTTP version
What three things are on the start-line of an HTTP response message?
The protocol version, A status code,A status text
What are HTTP headers?
HTTP headers let the client and the server pass additional information with an HTTP request or response.
Where would you go if you wanted to learn more about a specific HTTP Header?
MDN
Is a body required for a valid HTTP request or response message?
no
What is AJAX?
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.
What does the AJAX acronym stand for?
Asynchronous JavaScript And XML.
Which object is built into the browser for making HTTP requests in JavaScript?
XMLHttpRequest object
What event is fired by XMLHttpRequest objects when they are finished loading the data from the server?
load
An XMLHttpRequest object has an addEventListener() method just like DOM elements. How is it possible that they both share this functionality?
They both inherited from the event target.?