pg 228 paraMeterS cannot have deFault valueS

by Lucille Kenney

JavaScript

/* PARAMETERS CANNOT HAVE DEFAULT VALUES */

/*function functionName(someVar) {
    console.log(someVar + '\n');
}

functionName(true);
functionName();
*/

/*Using this information, you can test that a value was received in a function parameter by confrming that the parameter variable isn’t undefined:*/

/*function functionName(someVar) {
    if (typeof someVar == ‘undefined’) { // Undefined
    } else { // Good to go!
    }
    console.log(someVar + '\n');
}
functionName();*/