I have written this code and except for the header, nothing else comes out. Where is the / the failures?
<!DOCTYPE html>
<html lang="es">
<body>
<h2>JavaScript document.write & document.getElementById.innerHTML Methods</h2>
<p id="output1" ></p>
<p id="output2" ></p>
<script>
var myObj = [firsname : 'John', lastname : 'Doe'];
document.write(" " + myObj);
document.write("hello world");
document.getElementById("output1").innerHTML = "" + myObj;
document.getElementById("output2").innerHTML = "Hello World";
</script>
</body>
</html>