Output:

Hello, World!

In this example, we have declared a variable called myHeading. Then we have assigned the targeting value to the variable. we have used the querySelector() function for targeting HTML tag and the var.textContent function for placing the text.