Introduction to JavaScript

JavaScript is a language that runs in your web browser. It is often used to do things with HTML elements on the page, and can help interact with the user.

Here is an example that shows an alert message. The JavaScript code is between the <script> tags:

<!DOCTYPE html>
  <title>My Page</title>





calls the alert function. For now, just think of it as an instruction you give to the web page. It shows an alert:

a web page with an alert dialog showing

Next: Variables in JavaScript


Leave a comment

What color are green eyes? (spam prevention)
Code under MIT License unless otherwise indicated.
© 2020, Downranked, LLC.