Member-only story

An Introduction to Functional Programming Style in JavaScript

Ghost Together
7 min readJan 4, 2019

--

Grab your copy of CSS Visual Dictionary incl. diagrams of all CSS properties.

In recent years there has been a tectonic shift happening between traditional programming and Functional Programming style in JavaScript. It’s not about one being better than the other but simply a personal preference.

You’ll get the most out of this article if you’re coming to the world of FP for the first time ever. It’s just a demonstration of basic principles.

What is Functional Programming all about in general?

  1. Clean CodeYour program is easy to read and therefore maintain.
  2. Syntactic Efficiency — The problem your code is trying to solve is expressed with less code but without sacrificing its function.
  3. More Abstract — Instead of thinking about the logic of a for-loop, your program will look more abstract, almost symbolic, like a math equation.
  4. Automatic Reduction of Common Errors — simply developing a FP mindset will automatically prevent you from bumping into some of the most commonly overlooked programming errors and traps.
  5. Do More In Less Lines Of Code — Your code will look significantly shorter than its traditional style equivalent.

--

--

Ghost Together
Ghost Together

Written by Ghost Together

Ghost Together @ https://semicolon.dev is an alternative to Twitter. Sign up to meet other makers of things.

Responses (1)