Programming Code Center(PCC)
[JS]

(PCC)::[how-to-use-JavaScript-in-body-tag-and-run-program-with-proper-output]::[js]

File Name : index.html

<!DOCTYPE html>
<html>
<body>

<h2>JavaScript in Body</h2>

<p id="demo">A Paragraph.</p>

<button type="button" onclick="myFunction()">Try it</button>

<script>
function myFunction() {
  document.getElementById("demo").innerHTML = "Paragraph changed.";
}
</script>

</body>
</html> 

Output :

JavaScript in Body

A Paragraph.