let persons = [ { name: 'Sergey', surname: 'Honcharenko', age: 28, isMarried: false, }, { name: 'Andrew', surname: 'Klymchuk', middleName: 'Anatoliyovych', haveAJob: true, }, { name: 'Alexander', surname: 'Slobodian', sex: 'male', hasAPet: false, } ]; let str = ""; for (let key in persons) { str += ""; for (let value in persons[key]) { str += ``; } str += ""; } str += "
${persons[key][value]}
"; document.write(str);