Skip to content

Instantly share code, notes, and snippets.

@emamut
Created February 27, 2016 04:50
Show Gist options
  • Save emamut/592ce9375b0f692dd645 to your computer and use it in GitHub Desktop.
Save emamut/592ce9375b0f692dd645 to your computer and use it in GitHub Desktop.
Escribe Código Limpio sin morir en el intento - clean.js
function calculator(num_a, num_b, operation) {
if(operation == 'addition')
return num_a + num_b;
if(operation == 'substraction')
return num_a - num_b;
if(operation == 'multiplication')
return num_a * num_b;
if(operation == 'division')
return num_a / num_b;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment