Thus is my code:
js-file:
document.querySelector('button').innerHTML = "Hello World!";
and the only other file I have, which is index.htm:
<html lang="sv_en">
<head><title>My JS Project</title></head>
<body>
<button>This text will change</button>
</body>
<script src="js/button.js"/></script>
</html>