Skip to Main Content
JavaScript Absolute Beginner's Guide, 2nd Edition
book

JavaScript Absolute Beginner's Guide, 2nd Edition

by Kirupa Chinnathambi
December 2019
Beginner content levelBeginner
464 pages
10h 31m
English
Que
Content preview from JavaScript Absolute Beginner's Guide, 2nd Edition

10. 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!). So far, all of the code we have been writing has been contained fully inside an HTML document:

<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>An Interesting Title Goes Here</title>

  <style>
    body {
      background-color: #EEE;
    }

    h1 {
      font-family: sans-serif;
      font-size: 36px;
    }

    p {
      font-family: sans-serif;
    }
  </style>
</head>

<body>
  <h1>Are you ready for this?</h1>
  <p>Are you ready for seeing (or already having seen!) the most
amazing dialog ever?</p>

  <script>
    alert("hello, world!" ...
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 Absolute Beginner’s Guide

JavaScript Absolute Beginner’s Guide

Kirupa Chinnathambi

Publisher Resources

ISBN: 9780136204213