Giter Club home page Giter Club logo

jstdg7's Introduction

Example code from JavaScript: The Definitive Guide

The cover of JavaScript: The Definitive Guide

This repo includes all of the numbered examples from the 7th edition of my book, plus many unnumbered examples as well. In general, if an unnumbered example defines a function that seems like it might be useful to someone, I've included it here. The code is listed below in roughly the same order as in the book. To locate code, just look below for the example number or section number that the code appears in.

This code is far more useful when studied in the context of the book in which it appears, and I'd ask you to please buy yourself a copy if you are able to. These examples are free for everyone to use.

If you discover problems with this repo, or bugs in the code, please open a GitHub issue. (Note, however, that I will not accept pull requests because I need to maintain clear copyright to the code so that I can use it in future editions of the book.)

Chapter 1: Introduction to JavaScript

  • Example 1-1: Computing character frequency histograms with JavaScript

Chapter 3: Types, Values, and Variables

Chapter 6: Objects

Chapter 7: Arrays

  • §7.8.6: Array Searching and Sorting Methods
  • §7.9: Array-Like Objects

Chapter 8: Functions

Chapter 9: Classes

  • Example 9-1: A simple JavaScript class
  • Example 9-2: A Range class using a constructor
  • Example 9-3: The Range class rewritten using class
  • Example 9-4: Complex.js: a complex number class
  • Example 9-5: Span.js: a simple subclass of Range
  • §9.5.2: Subclasses with extends and super
  • Example 9-6: TypedMap.js: a subclass of Map that checks key and value types
  • Example 9-7: Histogram.js: a Set-like class implemented with delegation
  • Example 9-8: Sets.js: a hierarchy of abstract and concrete set classes

Chapter 10: Modules

  • §10.1: Modules with Classes, Objects, and Closures

Chapter 11: The JavaScript Standard Library

Chapter 12: Iterators and Generators

Chapter 13: Asynchronous JavaScript

Chapter 14: Metaprogramming

Chapter 15: JavaScript in Web Browsers

Chapter 16: Server-Side JavaScript with Node

jstdg7's People

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.