JavaScript-mancy: Getting Started

JavaScript-mancy: Getting Started

Jaime González García
Buy on Leanpub

Table of Contents

About The Author›

  • About The Author
  • About the Technical Reviewers
  • Prelude
    • A Story About Why I Wrote This Book
    • Why Should You Care About JavaScript?
    • What is the Goal of This Book?
    • What is the Goal of The JavaScript-mancy Series?
    • Why JavaScript-mancy?
    • Is This Book For You?
    • How is The Book Organized?
    • How Are The JavaScript-mancy Series Organized? What is There in the Rest of the Books?
    • Understanding the Code Samples in This Book
    • A Note About ECMAScript 5 and ECMAScript 6,7 within The Book
    • A Note About the Use of Generalizations in This Book
    • Do You Have Any Feedback? Found Any Error?
    • A Final Word From the Author

Tome I. Mastering the Arcane Art of JavaScript-mancy›

  • Introduction
  • Once Upon a Time…
  • The Essential Ingredients Of JavaScript-Mancy
    • An Introduction to JavaScript-Mancy
    • JavaScript
    • JavaScript Has Some Types
    • Strings in JavaScript
    • Functions in JavaScript
    • OOP and Objects in JavaScript
    • Arrays, Maps and Sets in JavaScript
    • JavaScript Flow Control
    • Logical Operators in JavaScript
    • Exception Handling
    • Regular Expressions
    • But Beware, JavaScript Can Be Weird and Dangerous
    • Concluding
  • The Basics Of JavaScript Functions
    • The Basics Of Functions
    • Functions are the Key
    • Function Expressions
    • Function Declarations
    • Concluding: Prefer Function Declarations and Named Function Expressions
    • Exercises
  • Useful Function Patterns: Default Arguments
    • Have You Heard Of Defaults?
    • Using Default Arguments in JavaScript Today
    • Defaults with Objects
    • Native Default Arguments with ECMAScript 6
    • Concluding
    • Exercises
  • More Useful Function Patterns: Arbitrary Arguments
    • An Arbitrary Number of Arguments
    • The Craziness Of Function Arguments in JavaScript
    • Functions with Arbitrary Arguments Right Now!
    • Array-Like Objects
    • Native Arbitrary Arguments with ES6 Rest Parameters
    • Concluding
    • Exercises
  • More Useful Function Patterns: Function Overloading
    • Have you Heard About The Marvels Of Overloading?
    • The Problem with Function Overloading in JavaScript
    • How Do We Do Function Overloading Then?
    • Function Overloading by Inspecting Arguments
    • Using an Options Object
    • Relying on ES6 Defaults
    • Taking Advantage of Polymorphic Functions
    • Concluding
    • Exercises
  • On the Art of Summoning Servants and Critters, Or Understanding The Basics of JavaScript Objects
    • An Army of Objects
    • Object Initializers (a.k.a. Object Literals)
    • Creating Objects With Factories
    • Data Privacy in JavaScript
    • ES6 Improves Object Initializers
    • ES6 Symbols and Data Privacy
    • Concluding
    • Exercises
  • Mysteries of the JavaScript Arcana: JavaScript Quirks Demystified
    • A Couple of Tips About JavaScript Quirks and Gotchas
    • A Quick Refresher of the JavaScript Arcana 101
    • This, Your Most Dangerous Foe
    • Global Scope by Default and Namespacing in JavaScript
    • Type Coercion Madness
    • Using JavaScript in Strict Mode
    • Concluding
    • Exercises
  • A Guide to Strings, Finding the Right Words and Proper Spell Intonation
    • Find the Right Words You Must
    • The Basic Of Strings
    • New String Features in ES6
    • String Cheatsheet
    • Concluding
    • Exercises
  • Upgrading Your Everyday JavaScript Magic With ES6 - Destructuring
    • Welcome to the Future! ECMAScript 6
    • Destructure All The Things!
    • Destructuring Objects
    • Destructuring Arrays
    • Destructuring Function Arguments
    • Concluding
    • Exercises
  • Upgrading Your Everyday JavaScript Magic With ES6 - Arrow Functions
    • Behold! The Arrow Function!
    • Arrow Functions Arcana
    • Arrow Functions And This Gotchas
    • Arrow Functions Don’t Have Arguments Object
    • Arrow Functions and the New and Super Operators
    • Concluding
    • Exercises
  • Upgrading Your Everyday JavaScript Magic With ES6 - The Spread Operator
    • Ready To Spread Your Wings?
    • Use the Spread Operator to Seamlessly Concatenate Arrays
    • Easily Use Apply With the Spread Operator
    • Converting Array-likes and Collections Into Arrays
    • Spread Lets You Combine New and Apply
    • Concluding
    • Exercises

Tome I.II JavaScriptmancy and Data Structures›

  • JavaScript Arrays: The All-in-one Data Structure
    • We’ll Just Need To Make Sense of All These Items
    • JavaScript’s Array
    • An Extremely Flexible Data Structure
    • Sorting Arrays
    • Safe Array Methods
    • JavaScript Arrays and LINQ
    • Other ES6 and ES7 Features
    • Array Cheatsheet
    • Concluding
    • Exercises
  • Organizing Your Data With ES6 Maps
    • Take a Look at These Maps
    • JavaScript’s Map
    • Iterating Over the Elements of a Map
    • Creating a Map From an Iterable Collection
    • Map Cheatsheet
    • Concluding
    • Exercises
  • Sets, For When There Can Only Be One
    • You Are One of a Kind
    • Working With Sets
    • Iterating Sets
    • Using Array Methods With Sets
    • How Do Sets Understand Equality?
    • Sets Cheatsheet
    • Concluding
    • Exercises

Book I. Epilogue›

    Tome I.III JavaScriptmancy and OOP: The Path of The Summoner (preview)›

    • Introduction to the Path of Summoning and Commanding Objects (a.k.a. Object Oriented Programming)
      • A Soft Introduction to OOP in JavaScript
      • C# Classes in JavaScript
      • OOP Beyond Classes
      • Combining Classes with Object Composition
      • The Path of the Object Summoner Step by Step
      • Concluding

    References and Appendix›

    • Appendix A. Setting Up Your Developing Environment For ES6
      • Using ES6 with Node.js
      • ES6 and Modern Browsers
      • Real-World ES6 Development Environments
    • Appendix B. Fantasy Glossary
    • References
      • Specifications
      • Books

    Notes›

      JavaScript-mancy: Getting Started/