Learning JavaScript Add Sparkle and Life to Your Web Pages 3rd Edition

Book FormatPDF
Language English
Pages 364
Views 138
Size 5.4 MiB
Downloads 61
Learning JavaScript Add Sparkle and Life to Your Web Pages 3rd Edition

Learning JavaScript Add Sparkle and Life to Your Web Pages 3rd Edition is available for free download in PDF format

Introduction

This is an exciting time to learn JavaScript. Now that the latest JavaScript specification—ECMAScript 6.0 (ES6)—has been finalized, learning how to develop high-quality applications with this language is easier and more satisfying than ever. This practical book takes programmers (amateurs and pros alike) on a no-nonsense tour of ES6, along with some related tools and techniques.

Author Ethan Brown (Web Development with Node and Express) not only guides you through simple and straightforward topics (variables, control flow, arrays) but also covers complex concepts such as functional and asynchronous programming. You’ll learn how to create powerful and responsive web applications on the client, or with Node.js on the server.

  • Use ES6 today and transcompile code to portable ES5
  • Translate data into a format that JavaScript can use
  • Understand the basic usage and mechanics of JavaScript functions
  • Explore objects and object-oriented programming
  • Tackle new concepts such as iterators, generators, and proxies
  • Grasp the complexities of asynchronous programming
  • Work with the Document Object Model for browser-based apps
  • Learn Node.js fundamentals for developing server-side applications

Table of Contents

  1. Chapter 1 Your First Application
    1. Where to Start
    2. The Tools
    3. A Comment on Comments
    4. Getting Started
    5. The JavaScript Console
    6. jQuery
    7. Drawing Graphics Primitive
    8. Automating Repetitive Tasks
    9. Handling User Input
    10. Hello, World
  2. Chapter 2 JavaScript Development Tools
    1. Writing ES6 Today
    2. ES6 Features
    3. The Transcompilers
    4. Linting
    5. Conclusion
  3. Chapter 3 Literals, Variables, Constants, and Data Types
    1. Variables and Constants
    2. Variables or Constants: Which to Use?
    3. Identifier Names
    4. Literals
    5. Primitive Types and Objects
    6. Numbers
    7. Strings
    8. Special Characters
    9. Booleans
    10. Symbols
    11. null and undefined
    12. Objects
    13. Number, String, and Boolean Objects
    14. Arrays
    15. Trailing Commas in Objects and Arrays
    16. Dates
    17. Regular Expressions
    18. Maps and Sets
    19. Data Type Conversion
    20. Conclusion
  4. Chapter 4 Control Flow
    1. A Control Flow Primer
    2. Control Flow Statements in JavaScript
    3. Useful Control Flow Patterns
    4. Conclusion
  5. Chapter 5 Expressions and Operators
    1. Operators
    2. Arithmetic Operators
    3. Operator Precedence
    4. Comparison Operators
    5. Comparing Numbers
    6. String Concatenation
    7. Logical Operators
    8. AND, OR, and NOT
    9. Grouping Operator
    10. Destructuring Assignment
    11. Object and Array Operators
    12. Expressions in Template Strings
    13. Expressions and Control Flow Patterns
    14. Conclusion
  6. Chapter 6 Functions
    1. Return Values
    2. Calling Versus Referencing
    3. Function Arguments
    4. Functions as Properties of Objects
    5. The this Keyword
    6. Function Expressions and Anonymous Functions
    7. Arrow Notation
    8. call, apply and bind
    9. Conclusion
  7. Chapter 7 Scope
    1. Scope Versus Existence
    2. Lexical Versus Dynamic Scoping
    3. Global Scope
    4. Block Scope
    5. Variable Masking
    6. Functions, Closures, and Lexical Scope
    7. Immediately Invoked Function Expressions
    8. Function Scope and Hoisting
    9. Function Hoisting
    10. The Temporal Dead Zone
    11. Strict Mode
    12. Conclusion
  8. Chapter 8 Arrays and Array Processing
    1. A Review of Arrays
    2. Array Content Manipulation
    3. Array Searching
    4. The Fundamental Array Operations: map and filter
    5. Array Magic: reduce
    6. Array Methods and Deleted or Never-Defined Elements
    7. String Joining
    8. Conclusion
  9. Chapter 9 Objects and Object-Oriented Programming
    1. Property Enumeration
    2. Object-Oriented Programming
    3. Multiple Inheritance, Mixins, and Interfaces
    4. Conclusion
  10. Chapter 10 Maps and Sets
    1. Maps
    2. Weak Maps
    3. Sets
    4. Weak Sets
    5. Breaking the Object Habit
  11. Chapter 11 Exceptions and Error Handling
    1. The Error Object
    2. Exception Handling with try and catch
    3. Throwing Errors
    4. Exception Handling and the Call Stack
    5. try…catch…finally
    6. Let Exceptions Be Exceptional
  12. Chapter 12 Iterators and Generators
    1. The Iteration Protocol
    2. Generators
    3. Conclusion
  13. Chapter 13 Functions and the Power of Abstract Thinking
    1. Functions as Subroutines
    2. Functions as Subroutines That Return a Value
    3. Functions as…Functions
    4. So What?
    5. IIFEs and Asynchronous Code
    6. Function Variables
    7. Recursion
    8. Conclusion
  14. Chapter 14 Asynchronous Programming
    1. The Analogy
    2. Callbacks
    3. Promises
    4. Generators
    5. Conclusion
  15. Chapter 15 Date and Time
    1. Dates, Time Zones, Timestamps, and the Unix Epoch
    2. Constructing Date Objects
    3. Moment.js
    4. A Practical Approach to Dates in JavaScript
    5. Constructing Dates
    6. Transmitting Dates
    7. Displaying Dates
    8. Date Components
    9. Comparing Dates
    10. Date Arithmetic
    11. User-Friendly Relative Dates
    12. Conclusion
  16. Chapter 16 Math
    1. Formatting Numbers
    2. Constants
    3. Algebraic Functions
    4. Trigonometric Functions
    5. Hyperbolic Functions
  17. Chapter 17 Regular Expressions
    1. Substring Matching and Replacing
    2. Constructing Regular Expressions
    3. Searching with Regular Expressions
    4. Replacing with Regular Expressions
    5. Input Consumption
    6. Alternation
    7. Matching HTML
    8. Character Sets
    9. Named Character Sets
    10. Repetition
    11. The Period Metacharacter and Escaping
    12. Grouping
    13. Lazy Matches, Greedy Matches
    14. Backreferences
    15. Replacing Groups
    16. Function Replacements
    17. Anchoring
    18. Word Boundary Matching
    19. Lookaheads
    20. Constructing Regexes Dynamically
    21. Conclusion
  18. Chapter 18 JavaScript in the Browser
    1. ES5 or ES6?
    2. The Document Object Model
    3. Some Tree Terminology
    4. DOM “Get” Methods
    5. Querying DOM Elements
    6. Manipulating DOM Elements
    7. Creating New DOM Elements
    8. Styling Elements
    9. Data Attributes
    10. Events
    11. Ajax
    12. Conclusion
  19. Chapter 19 jQuery
    1. The Almighty Dollar (Sign)
    2. Including jQuery
    3. Waiting for the DOM to Load
    4. jQuery-Wrapped DOM Elements
    5. Manipulating Elements
    6. Unwrapping jQuery Objects
    7. Ajax
    8. Conclusion
  20. Chapter 20 Node
    1. Node Fundamentals
    2. Modules
    3. Core Modules, File Modules, and npm Modules
    4. Customizing Modules with Function Modules
    5. Filesystem Access
    6. Process
    7. Operating System
    8. Child Processes
    9. Streams
    10. Web Servers
    11. Conclusion
  21. Chapter 21 Object Property Configuration and Proxies
    1. Accessor Properties: Getters and Setters
    2. Object Property Attributes
    3. Protecting Objects: Freezing, Sealing, and Preventing Extension
    4. Proxies
    5. Conclusion
  22. Chapter 22 Additional Resources
    1. Online Documentation
    2. Periodicals
    3. Blogs and Tutorials
    4. Stack Overflow
    5. Contributing to Open Source Projects
    6. Conclusion
  23. Appendix Reserved Words
  24. Appendix Operator Precedence

Related PDF Books