Functional programming- Java-script example 1 1 minute read Functional programming- Java-script example 1 Firstly, making a data structure as below.