I am trying to figure out why the createElement and appendChild aren't working. I believe I've got my code correct so I'm not too sure why it's not working... (I am using IE 10)
CODE UPDATED
JavaScript File:
var myObj = {
firstName: "John",
lastName: "Smith"
};
HTML File:
<!DOCTYPE html />
<html>
<title>The Data Structure</title>
<body>
<script type="text/javascript" src="TheData.js">
var theElement = document.createElement('p');
var theText = document.createTextNode(myObj.firstName);
theElement.appendChild(theText);
document.body.appendChild(theElement);
</script>
</body>
</html>