Created
September 22, 2017 15:27
-
-
Save DiegoPinho/4ea5778b76649baebdfba6a46d199f9e to your computer and use it in GitHub Desktop.
This file contains 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
function multiplicaPor(valor, multiplcador = valor) { | |
// caso o multiplicador não seja passado, ele será o próprio valor | |
return multiplcador * valor; | |
} | |
multiplicaPor(2,3); // 6 | |
multiplicaPor(2); // 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment