Programming Code Center(PCC)
[JS]

(PCC)::[How-JavaScript-statements-can-be-grouped-together-in-code-blocks]::[js]

File Name : index.html

<!DOCTYPE html>
<html>
<body>

<h2>JavaScript Statements</h2>

<p>JavaScript code blocks are written between { and }</p>

<button type="button" onclick="myFunction()">Click Me!</button>

<p id="demo1"></p>
<p id="demo2"></p>

<script>
function myFunction() {
  document.getElementById("demo1").innerHTML = "Hello Dolly!";
  document.getElementById("demo2").innerHTML = "How are you?";
}
</script>

</body>
</html>

Output :

JavaScript Statements

JavaScript code blocks are written between { and }