SitePoint
Blog
Forum
Library
Login
Join Premium
Toggle sidebar
JavaScript: Novice to Ninja, 2nd Edition
Toggle community discussions
Close
Content
Files
Bookmarks
Preface
JavaScript: Novice to Ninja 2nd Edition
Notice of Rights
Notice of Liability
Trademark Notice
About Darren Jones
About SitePoint
Who Should Read This Book
Conventions Used
Supplementary Materials
1
Hello, JavaScript
Programming
JavaScript
The History of JavaScript
The Browser Wars
Web 2.0
Standards
HTML5
Node.js
JavaScript Versions
The Future of JavaScript
A Ninja Programming Environment
Installing Node
JavaScript In The Console
Text Editors
Your First JavaScript Program
JavaScript in the Browser
Three Layers of the Web
Unobtrusive JavaScript
Graceful Degradation and Progressive Enhancement
Your Second JavaScript Program
Don't Break the Web
The Project: Quiz Ninja
Chapter Summary
Programming Basics
Comments
JavaScript Grammar
Reserved Words
Primitive Data Types
Variables
Naming Constants & Variables
Direct Assignment and Assignment By Reference
Strings
String Properties and Methods
Template Literals
Symbols
Numbers
Number Methods
Changing The Value of Variables
Type Coercion
Converting Between Strings and Numbers
Undefined
Null
Booleans
Logical Operators
Bitwise Operators
Comparison
Quiz Ninja Project
Chapter Summary
Arrays, Logic, and Loops
Arrays
Sets
Converting Sets to Arrays
Maps
Converting Maps to Arrays
Logic
Loops
Quiz Ninja Project
Chapter Summary
Functions
Defining a Function
Invoking a Function
Return Values
Parameters and Arguments
Callbacks
Array Iterators
Quiz Ninja Project
Chapter Summary
Objects
Object Literals
Creating Objects
Calling Methods
Checking if Properties or Methods Exist
Finding all the Properties of an Object
Removing Properties
Nested Objects
Namespacing
Built-in Objects
Character Groups
Quiz Ninja Project
Chapter Summary
The Document Object Model
The Document Object Model
History of the DOM
An Example Web Page
Getting Elements
Setting An Element’s Attributes
Updating CSS
Quiz Ninja Project
Chapter Summary
Events
Event Listeners
Example Code
The Event Object
Types of Events
Removing Event Listeners
Stopping Default Behavior
Event Propagation
Event Delegation
Quiz Ninja Project
Chapter Summary
Forms
Forms
A Searching Example
Input Fields
I Need a Hero!
Form Validation
Disabling the Submit Button
Quiz Ninja Project
Chapter Summary
The Window Object
The Browser Object Model
Browser Information
The Browser History
Controlling Windows
Screen Information
The Document Object
Timing Functions
setInterval()
Animation
Quiz Ninja Project
Chapter Summary
Testing and Debugging
Errors, Exceptions, and Warnings
The Importance of Testing and Debugging
Strict Mode
Feature Detection
Debugging in the Browser
Error Objects
Exception Handling
Tests
Quiz Ninja Project
Chapter Summary
Further Functions
Function Properties and Methods
Immediately Invoked Function Expressions
Functions that Define and Rewrite Themselves
Recursive Functions
Callbacks
Closures
Functional Programming
Getting Functional
Quiz Ninja Project
Chapter Summary
Object-Oriented Programming in JavaScript
Object-Oriented Programming
Constructor Functions
Static Methods
Prototypal Inheritance
Public and Private Methods
Inheritance
The Object Constructor
Polymorphism
Adding Methods to Built-in Objects
Property Attributes and Descriptors
Creating Objects from Other Objects
Mixins
Chaining Functions
Binding this
Borrowing Methods from Prototypes
Composition Over Inheritance
Quiz Ninja Project
Chapter Summary
Ajax
Clients and Servers
A Brief History of Ajax
The Fetch API
Receiving Information
Sending Information
FormData
A Living Standard
Quiz Ninja Project
Chapter Summary
HTML5 APIs
HTML5
The data- Attribute
HTML5 APIs
Other APIs
Drawing with Canvas
Shims and Polyfills
Quiz Ninja Project
Chapter Summary
Modern JavaScript Development
Libraries
Modular JavaScript
MVC Frameworks
Templates
Package Managers
Deploying JavaScript
Quiz Ninja Project
Chapter Summary
Next Steps
What’s Next For JavaScript?
Ninja Skills
Pair Programming
JavaScript Development Ideas
Single-page Web Applications
Chapter Summary
Open text modal
Community Questions
Close