An extensive list of everyday modern JavaScript with syntactical examples as well as an easy to follow README structure
This repository is a place for pragmatic javascript developers (beginners to advanced) to view and familiarize themselves with modern everyday patterns and idioms in vanilla style ES5 & ES6. The great majority of syntax found here is very useful and common in the modern world of JavaScript. Note, there are no silver bullets, so please don't try and force your problem to fit a pattern or tool.
I hope you find that this repo will help you to quickly recognize even the trivial of syntax and therefore be able to apply it in your situation - most of all I hope you find invaluable inspiration and satisfaction as you work through the examples. For novices, you'll gain the most if you revisit them after you've gained some experience.
Listed within this repository is not only syntax but patterns and other useful concepts as well:
- Essential Code Syntax & Guidelines
- Design Patterns
- Modern Functional Patterns / Concepts
- ES6 / ES7
- Async
...note that the work here has been identified by the JavaScript community as well as within the authors own work. Thanks should be given to the developers, early adopters, JavaScript technocrats, and technology pundits that came before us outlining important and often misunderstood concepts.
-
ESSENTIAL JAVASCRIPT
1.1 Variable Declaration
1.2let&const
1.3 Global Variables
1.4 Coding & Naming Conventions
1.5 Commas, Comments, Semicolons & Whitespace
1.6 Strings
1.7 Implicit Coercion
1.8 Iteration Statements / Loops
1.9 Block Scope vs Lexical Scope
1.10 Conditionals -
CORE JS OBJECT CREATION & CORE DESIGN PATTERNS
2.1 Object Creation
2.2 Object.create
2.3 Object Enumeration
2.4 Object Cloning
2.5 Object Factory Pattern
2.6 NameSpace Pattern
2.7 Module Pattern
2.8 Chaining Pattern
2.9 Constructor Function Pattern
2.10 Prototype Pattern
2.11 Class Pattern -
JAVASCRIPT DESIGN PATTERNS
3.1 Singleton Pattern
3.2 Iterator Pattern
3.3 Pub/Sub Pattern
3.4 Observer Pattern
3.5 Decorator Pattern
3.6 Facade Pattern -
ARRAYS
4.1 Array Basics & Creation
4.2 Array Iteration
4.3 ES6 Array Methods
4.4 Destructuring
4.5 Spread & Rest
4.6 Functional Array Patterns -
FUNCTIONS
5.1 IIFE / IIAF
5.2 Immediate Object Initialization
5.3 Function Invocation
5.4 Returning from Functions
5.5 Callbacks
5.6 Closures
5.7 Higher Order Functions
5.8 Arrow Functions
5.9 Partial Application
5.10 ThethisKeyword -
ASYNC PATTERNS
6.1 Callbacks in Depth
6.2 Promises
6.3 Async Generators
6.4 Async Functions -
MODULE CREATION
7.1 Node & NPM
7.2 ES6
7.3 Babel -
MODERN JAVASCRIPT
8.2 Higher Order Functions
8.2 Imperative vs. Declarative Programming
8.3 Higher Order Functions
8.4 Functional Programming
8.5 Pure Functions, Impure Functions and Side Effects
8.6 Stateful and Stateless
8.7 Immutability and Mutability -
ES6 PATTERNS
9.1 Arrow Functions
9.2 Rest
9.3 Destructuring
9.4 Array Spreads
9.5 Iterators and Generators
9.6 Default Parameters
In future releases we will also cover Angular (2.x) and React patterns. The formula for adding patterns will be determinedby libraries / frameworks that hold the most market value. Once this repository contains enough information I'd like it to be converted into a full blown application so developers can cover a great deal and retain information in short, but more meaningful bursts.
When time permits, there will be a version out on Leanpub or Gitbook - it's too early to tell at this point, but the skies the limit.
If you or your team of developers need hands on training regarding the material covered in this course please reach out to me: ahadb.com
- Mozilla Developer Network
- Scotch.io JavaScript
- Raganwald by Reginald Braithwaite
- Sitepoint
- 2@lity by Dr. Axel Rauschmayer
- Toptal Engineering Blog
- Ben Alman
- David Walsh
- Perfection Kills by Kangax
- Douglas Crockford JavaScript
- Pony Foo
- JavaScript Design Patterns - Addy Osmani
- Human JS - Henrik Joreteg
- Object Oriented JavaScript - Stoyan Stefanov
- JavaScript Patterns - Stoyan Stefanov
- You Don't Know JS - Kyle Simpson
- Eloquent JavaScript - Marijn Haverbeke
- JavaScript: The Good Parts - Douglas Crockford
- Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript - David Herman
- Maintainable JavaScript - Nicholas C. Zakas
- Professional JavaScript for Web Developers - Nicholas C. Zakas
Feel free to contribute to this repository by sending a PR for a specific pattern that you would like to see added. A guide will be put up shortly.