const sequenceSum = (b, e, s) => +(b <= e) && b + sequenceSum(b+s, e, s);
I don't understand how the plus sign before the test along with &&
evaluates. The expectation is that this function will in fact return one or the other rather then "this and this". If b <= e then the function is expected to return 0.