/* Curry Example
Example 1 plain arrow function*/
var greet = (greeting, name) => (console.log(greeting + ", " + name))
/* Curry Example
this is how curry works behind the scenes */
var greetCurried = function(greeting) {
return function(name) {
console.log(greeting + ", " + name);
};
};
/*changed the above function to arrow */
var greetCurried2 = (greeting) => (name) => console.log(greeting + ", " + name);
var initFirst = greetCurried2('Hola.. ')
initFirst('Karthick..Zoro')
/*This is not chicken curry ---- Another example */
var mycurryMuliple = (a) => (b) => (c) => console.log(a + b + c);
/*initing the seecond part*/
var second = mycurryMuliple(1);
/*calling second with nth param*/
second(2)(3);
var lvl1 = (a) => (b) => console.log(a + b)
var lvl2 = lvl1('Karthick');
lvl2('HI')
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.