Day 43 JavaScript Functional Programming

Today I finished the function programming portion of JavaScript in freecodecamp. Only 2 more sections to go! Still far from mastery JavaScript but repetition by completing projects will balance it out.

Functional programming along with OOP is another methodoloy in freecodecamp for JavaScript. It is the process of building software by composing pure functions, avoiding shared state, mutable data, and side-effects. Functional programming is declarative rather than imperative.

pure function is a function in which given the same inputs, always returns the same output, and has no side-effects.

Function composition is the process of combining two or more functions in order to produce a new function or perform some computation.

Shared state is any variable, object, or memory space that exists in a shared scope, or as the property of an object being passed between scopes.

The benefit of functional programming in JavaScript is that it is predictable as long as you know the common code patterns within it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Up ↑

%d bloggers like this: