Skip to content

mryenagandula/JavaScript_Functions_Currying

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

JavaScript Functions Currying

JavaScript Functions Currying

  • Functions Currying is same as funtions clousers in javascript.
  • In Functions currying we are always passing argument to the fuction and it will returning the function. By using that innerfunction will return output.

Example (1)

  function sumFn(a){
      return (b)=>{
          return a+b;
      }
  }

  const sum = sumFn(1);
  console.log(sum(6));

Example (2)

  function sumFn2(a){
      return (b)=>{
          return a+b;
      }
  }

  console.log(sumFn2(2)(3))

Example (3) (Arrow Functions)

  const sumFn3 = a => b => a+b;
  console.log(sumFn3(7)(3))

About

This projects gives you information related to how to do function currying in javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published