Question: JavaScript and HTML fill in the 3 Blanks/Solutions. #1 Part 1 Assign newElement with a new li element. Assign textNode with a new TextNode containing

JavaScript and HTML fill in the 3 Blanks/Solutions.

#1 Part 1

Assign newElement with a new li element. Assign textNode with a new TextNode containing "Alex".

HTML code-

  • Lisa
  • John
  • Jade

Javascript code-

var parentTag = document.getElementById('list');

/* Your solution goes here */

newElement.appendChild(textNode); parentTag.appendChild(newElement);

------------------------------------------------------------------------

#1 part 2

Assign jsonData with a JSON object with properties: studentName (a string), age (a number) and siblings (an array of strings). Note: The content of the properties doesn't matter.

Javascript-

var jsonData; /* Your solution goes here */

------------------------------------------------------------------------------

Store a new XMLHttpRequest object in the xhr variable, then assign xhrHandler function as the "load" event listener.

JavaScript-

function xhrHandler() { console.log("handling response: " + this.responseText); }

/* Your solution goes here */

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!