Lesson 1 of 10
What is JavaScript?
JavaScript is a programming language that makes websites interactive. It runs in the browser and can respond to user actions like clicks, typing, and scrolling.
Unlike HTML (structure) and CSS (style), JavaScript is a real programming language with variables, logic, and functions.
You can include JavaScript with a <script> tag, either inline or linked from an external .js file.
JS
<!-- Inline script -->
<script>
alert("Hello from JavaScript!");
<\/script>
<!-- External script -->
<script src="app.js"><\/script>