JavaScriptJavaScript · Lesson 01
JavaScript Introduction
Where JS runs, how to include it and console output.
Video tutorialTrack course · freeCodeCamp
Speed
Transcript & captions
5/5
JavaScript runs in every browser and on servers through Node. In HTML you add it with a <script> tag — usually at the end of <body> or with the defer attribute so the DOM exists first.
htmlhtml
<script src="app.js" defer></script>
<script>
console.log('inline script');
</script>Try it yourself
Knowledge check
0/1 answeredWhat does defer do?