Skip to content

Instantly share code, notes, and snippets.

View bell345's full-sized avatar

Thomas Bell bell345

View GitHub Profile
@bell345
bell345 / math.js
Last active August 29, 2015 14:21
My "math" library from when I first started coding.
function doMath()
{
var mathCond = document.getElementById("mcond").value;
if ((mathCond == "x") || (mathCond == "*") || (mathCond == "times") || (mathCond == "multiply"))
var output = multiplyMath();
else if ((mathCond == "+") || (mathCond == "add") || (mathCond == "plus"))
var output = addMath();
else if ((mathCond == "-") || (mathCond == "subtract") || (mathCond == "minus"))
var output = subtractMath();
else if ((mathCond == "/") || (mathCond == "divide"))