loading...

re: Semicolon Rules in JavaScript are weird... VIEW POST

FULL DISCUSSION
 

Hey Dean,

great article. :)

Since you seem to like clean, readable code, you may want to put your expression in parantheses, like this:

function addOneUndefined(x) {
    return (
        x + 1
    );
}

function cubicBezier(x, u0, u1, u2, u3) {
    return (
        u0 * (1 - x) * (1 - x) * (1 - x) +
        u1 * (1 - x) * (1 - x) * x +
        u2 * (1 - x) * x * x +
        u3 * x * x * x
    );
}
 
code of conduct - report abuse