Programming Flashcards

1
Q

Intranet

A
  • internal website that only employees can see and use
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

readyState property

A
  • hold numbers 0-4
  • # represents each state of the AJAX request
  • 4 = browser has received all of the data from the server
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

status and statusText properties

A
  • # sent from server
  • 200 = OK
  • 401 = Access denied
  • 404 = File not found
  • 500 = Internal server error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

JSON

A
  • JavaScript Object Notation
  • array or object format
  • object key/property names and string values both require double quotes

[{ “name” : “Dave”,
“inoffice” : true }]

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

responseText property

A
  • information that web server returns
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

JSON.parse

A
  • method that takes a string and tries to convert it to a JavaScript object
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Processing JSON Data

A
  1. Create a new HTML list item
  2. Check the “inoffice” property
  3. Get the value for the “name” property; Insert it inside the <li> tag
  4. Close the <li> tag
var employees = JSON.parse(xhr.responseText);
var statusHTML = '<ul class="bulleted">';
for (var i=0; i.innerHTML = statusHTML;
}
};
How well did you know this?
1
Not at all
2
3
4
5
Perfectly