- We can run JS on the browser's console by which we will have access to the page we are on.
- Also we can run it in a
<script> console.log('Heyyy'); </script>
Always try to have your
scripttag before the closing
bodytag, because we can access the HTML elements written above the
scripttag as they are above the JS.
- Also, we can run JS in another file using
<script src='relative path to js file'></script>
- Also we can run it via Node.js - instead of running in the context of a website we run it in an actual machine. In console, run: