closure and currying in JavaScript\ code example
Example 1: currying vs closure javascript
function closure(){
function first() { console.log('I was declared first')}
function second() { console.log('I was declared second')}
function third() { console.log('I was declared third')}
return [first, second, third]
}
Example 2: currying vs closure javascript
function closuredFunc (){
function closure(){
// some logic
}
}