Your browser does not support JavaScript!
Upvotes Anonymous 0 User 0

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>
<html>
<head>
  <title>My Page</title>
</head>
<body>

<script>
alert("Hello!");
</script>

</body>
</html>
This:
alert("Hello!");
calls the alert function. For now, just think of it as an instruction you give to the web page. It shows an alert:
Was this helpful?

Tags

Comments

Leave a Comment

I agree to the Terms of Service
Design © 2015, Downranked, LLC.,
Original user code contributions under MIT License