JSON output

Report a typo

Choose the JSON data output from the list below.

function display() {

     let data = 
    {
    "dog" : [
    { 
    "breed" : "Husky",
    },
              ]
    }
            
    let output = "<h1>Dog</h1>";
    output += "<ul>";    

    for (let i in data.dog) {
        output += "<li>" + data.dog[i].breed;
        }
            
        output += "</ul>";

        document.getElementById("dog").innerHTML=output;
        }    
        
window.onload = display;
Select one option from the list
___

Create a free account to access the full topic