(Solved) JavaScript and HTML fill in the 3 Blanks/Solutions

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-

<ul id=”list”>

<li>Lisa</li>

<li>John</li>

<li>Jade</li>

</ul>

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 */

Expert Answer

Answer to JavaScript and HTML fill in the 3 Blanks/Solutions…..
OR
Order Now
×

Hello!

Click one of our contacts below to chat on WhatsApp

× How can I help you?