function abs(nb)
{
    if(nb < 0)
        return nb * -1;
    return nb;
}
/*
 * Create the `abs` function that takes one number argument
 * and returns its absolute value.
 * You are not allowed to use `Math.abs`, make your own.
 * see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/abs
 *
 * @notions Functions, Ternary
 */
Create the `abs` function that takes one number argument
and returns its absolute value.
You are not allowed to use `Math.abs`, make your own.

@notions Functions, Ternary
Create the ` abs ` function that takes one number argument and returns its absolute value . You are not allowed to use ` Math . abs ` make your own . @notions Functions Ternary
function abs(nb)
{
    if(nb < 0)
        return nb * -1;
    return nb;
}
function abs ( nb ) { if ( nb < 0 ) return nb * - 1 ; return nb ; }
Create the `abs` function that takes one number argument
 and returns its absolute value.
Create the ` abs ` function that takes one number argument and returns its absolute value .