js-snippets

A collection of code snippets for learning various concepts in Javascript with ES6 standards


Project maintained by thephenom1708 Hosted on GitHub Pages — Theme by mattgraham

JS Snippets for Functional Programming Concepts

A collection of code snippets for various concepts in Functional Prgramming and Frontend/UI Development using Javascript with ES6 standards.

Running Snippets on Local Environment


  1. Clone the repository on your local machine.
  2. Change working directory to this repository.
  3. If you do not have node installed on the system, you need to install it first. https://nodejs.org/en/download/
  4. To run any snippet, open the terminal hit the following command.
    node <snippet-dir-name>
       
    Example:
    // To run polyfill-bind snippet
    node polyfill-bind
    

Table of Contents


  1. Call, Apply and Bind functions in JS
  2. Pollyfill for bind function in JS
  3. Function Currying in JS
  4. Tail Call Optimisation with recursion (TCO)