What happens when the code inside the script runs?

<html>
<body id="main">
<script>
var body = document.getElementById("main");
var text = document.createElement("p");
text.innerHTML = "Cookies. We use them.";
body.appendChild(text);
</script>
</body>
</html>]]>
A paragraph with the text Cookies. We use them. displays inside the bodyThe text p displays inside the bodyThe text text displays inside the body

A paragraph with the text Cookies. We use them. displays inside the body.