Skip to Main Content
JavaScript Essentials For Dummies
book

JavaScript Essentials For Dummies

by Paul McFedries
April 2024
Beginner content levelBeginner
192 pages
3h 21m
English
For Dummies
Content preview from JavaScript Essentials For Dummies

Chapter 1

JavaScript: The Big Picture

IN THIS CHAPTER

Bullet Getting a feel for programming in general, and JavaScript in particular

Bullet Checking out the tools you need to get coding

Bullet Adding comments to your JavaScript code

Bullet Storing your code in a separate JavaScript file

In this chapter, you explore some useful JavaScript basics. Don’t worry if you’ve never programmed before. I take you through everything you need to know, step-by-step, nice and easy. As you’re about to find out, it really is fun to program.

Adding JavaScript Code to a Web Page

Okay, it’s time to roll up your sleeves, crack your knuckles, and start coding. This section describes the standard procedure for constructing and testing a script and takes you through a couple of examples.

The <script> tag

The basic container for a script is, naturally enough, the HTML <script> tag and its associated </script> end tag:

<script> JavaScript statements go here</script>

Where do you put the <script> tag?

With certain exceptions, it doesn’t matter a great deal where you put your <script> tag. Some people place the tag between the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaScript All-in-One For Dummies

JavaScript All-in-One For Dummies

Chris Minnick

Publisher Resources

ISBN: 9781394263219Purchase Link