Hacker News new | ask | show | jobs
by alerighi 1894 days ago
That code is ugly anyway, something I would have wrote in middle school... why not:

    function check(x) {
        return test1(x) && test2(x) && test3(x) && test4(x);
    }
Or, since I assume is JavaScript, just:

    const check = x => test1(x) && test2(x) && test3(x) && test4(x);
1 comments

Nobody would actually write this, it's just a demonstration of the pattern at hand for the sake of discussion