Created
June 17, 2015 15:38
-
-
Save ErikPeterson/13e0aa55eb4a66f78df1 to your computer and use it in GitHub Desktop.
caculator scaffold
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Calculator = function(){}; | |
Calculator.prototype.input = function(operand1, operator, operand2){ | |
if(operator === '+'){ | |
return this.add(operand1, operand2); | |
} | |
} | |
Calculator.prototype.add = function(operand1, operand2){ | |
return operand1 + operand2; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment