Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is the solution to Codewars' KATA: Basical Mathematical Operations
function basicOp(operation, value1, value2)
{
if (operation === '+') {
return value1 + value2;
} else if(operation === '-') {
return value1 - value2;
} else if(operation === '*') {
return value1 * value2;
} else if(operation === '/'){
return value1/value2;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.