Last active
May 6, 2019 09:04
-
-
Save Rukeeo1/9797e0eaf23f29df5f894510d1f8f8b5 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 addNumber(a, b) { | |
return typeof a !== "number" || typeof b !== "number" | |
? "first and second parameter's must be numbers" | |
: Number((a + b).toFixed(2)); | |
} | |
/* Export the addNumber function to app.test.js */ | |
module.exports = addNumber; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment