var soldier = {
allegiance : "Ford" ,
armor: True,
weapon: "sword"
};
document.getElementById("soldier").innerHTML = " allegiance: " + soldier.allegiance + " <br/> " + " armor: + " soldier.armor + "Weapon(s): "+ soldier.weapon;
<DOCTYPE HTML>
<html>
<head>
<script src = "objscript.js" </script>
</head>
<body>
<p id = "soldier"> </p>
</body>
</html>
I know this is probably the easiest thing but I don't know what it is. I'm trying to make an object that just prints out the items in the object.