Collections of demo code for tasting and practicing syntax and features of javascript.
Also some algorithm solutions are included.
Build and compile by vite
, the project setup and dependencies are now more simpler, and runs faster.
run following command at project root:
yarn
yarn dev
comparison between commonJS and ES6 module.
using different approach to implement "singleton" pattern.
- static instance
- closure instance (not working in modern modular system)
- es6 class (actually the same as approach #1)
understanding prototype and __proto__
feature included:
- extends
- mix-ins
- quicksort
- typescript support
- jest support
- interface declaration for algorithm utilities
JavaScript Modules: A Beginner’s Guide
JavaScript Modules Part 2: Module Bundling