I'm following the firefox tutorial but I'm not able to run a hello word. Follow the code.
HTML code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Javascript 01</title>
<script type="text/javascript" src="scripts/main.js"></script>
</head>
<body>
<h1>Teste</h1>
</body>
</html>
JavaScript code
alert('123');
var myHeading = document.querySelector('h1');
myHeading.textContent = 'Hello world!';
alert
works, it's getting there. I wanted to know why you did not change the text from h1
to Hello Word.