Skip to content

Instantly share code, notes, and snippets.

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