I’m trying to get my script.js to render HTML inside my page. But it’s not doing it. What should i do?
HTML:
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Welcome to my website</h1>
<script src="script.js"></script>
</body>
</html>
My JS script:
document.body.appendChild(document.createElement('div'))
.textContent = 'Hello!!';