Answers for "function to replace logical &&"

0

function to replace logical &&

const and = (conditions) => 
             (value) => conditions.every(condition => condition(value) )

const isInRange = (min)
                 =>(max) 
                  => and([isGreaterThan(min), isLessThan(max) ])
Posted by: Guest on October-18-2021

Browse Popular Code Answers by Language