This content originally appeared on DEV Community and was authored by Mehul Lakhanpal
Questions asked:
1⃣ Implement custom .filter & .reduce
2⃣ Implement dynamic currying function
3⃣ Implement compose function
4⃣ Predict outputs
console.log('mehul' == ('lakhanpal' && 'mehul')) // true
console.log('mehul' === ('lakhanpal' || 'mehul')) // false
Concepts tested:
- Functional programming in JS
- Currying & composition
- Equality (
==
vs===
) - Short-circuiting (
&&
/||
)
Questions + Solutions:
https://replit.com/@318097/OptIQ-R2-JS#index.js
This content originally appeared on DEV Community and was authored by Mehul Lakhanpal