O'Reilly logo

JavaScript Absolute Beginner’s Guide by Kirupa Chinnathambi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

9. Where Should Your Code Live?

In This Chapter

Learn about the various places your code can live

Understand the pros and cons of the various approaches

Let’s take a break from our regularly scheduled...programming (ha!). Instead of looking at what goes into our code, in this chapter, we are going to go a bit higher and look at something really basic. We are going to look at where exactly the code you write should live.

Onwards!

The Options on the Table

So far, all of the code we have been writing has been contained fully inside an HTML document as shown in Figure 9.1.

Image

FIGURE 9.1 All of our code so far has been located in the same document ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required