Answers for "for each append to document"

0

for each append to document

var person = {
    firstName: "john",
    lastName: "doe",
    age: 45,
    placeOfBirth: "somewhere"
}

for(var key in person) {
    
        var p = document.createElement("p");
        p.innerHTML = person[key];
        document.body.appendChild(p)
    
}
Posted by: Guest on September-06-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language