Created
September 28, 2019 00:12
-
-
Save ebenezerdon/613d06a96e6e8aa333fe8156c412f677 to your computer and use it in GitHub Desktop.
A function to be used as an illustration in my article: JavaScript Functions
This file contains hidden or 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
const multiplyByTwo = function(value) { | |
if (isNaN(value)) { | |
return 'Value must be a number' | |
} | |
return (value * 2) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment