Quotes help make search much faster. Example: "Practice Makes Perfect"

Monday, December 17, 2012

Codecademy Sample Solution: Codeyear What About Negatives?



var qty = 0;

function modify_qty(val){
    var new_qty = qty + val;
   
    console.log(new_qty);
    return new_qty;
}

modify_qty(-12); // <-- change the parameter to a negative number

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts