Giter VIP home page Giter VIP logo

learning-javascript-3e's Introduction

Learning JavaScript, 3rd Edition: Companion Repository

This repository contains code samples from my book, Learning JavaScript, 3rd Edition (O'Reilly Media).

Introduction & Status

Many of you have been asking where the code samples are. Originally, I was not going to do a companion repo for this book because, with a few exceptions, most of the code samples in the book are simply small snippets that don't lend themselves well to organizing into a companion repo. Also, many of the code samples are intended to be entered interactively in a REPL (a browser console window, or Node), which makes them awkward for inclusion in a companion repository. For example, from Chapter 5:

const n = 5;
const s = "5";
n === s;            // false -- different types
n !== s;            // true
n === Number(s);    // true -- "5" converted to numeric 5
n !== Number(s);    // false
n == s;             // true; not recommended
n != s;             // false; not recommended

If you type this example into a REPL, you will see the resultant value from each line...but if I put this in a file in the companion repo, and you run it (either in a browser or with Node), there is no output at all!

Problems notwithstanding, enough people have asked (and begged!) for a companion repo, so I am going to start by focusing on the "larger" examples that do lend themselves well to a companion repo (such as Chapters 1, 4, and 14). I am open to suggestions on how to handle the code samples that are designed to be run interactively.

How this Repo is Structured

Sample code for each Chapter is in its own directory; Chapter 1 examples are in ch01, Chapter 2 examples are in ch02, and so on. Each chapter will have its own README.md file with notes specific to the examples from that chapter.

Many of the examples in the book are progressive; as you progress through the chapter, the code is progressively improved. Generally, the code in the repo is the final state you will reach at the end of the chapter, although I may include critical interemdiate steps in commented-out sections or separate files.

learning-javascript-3e's People

Contributors

ethanrbrown avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.