Last active
October 14, 2017 18:47
-
-
Save Fouzyyyy/e65e1ba0ce75c90d9340276438ff543c to your computer and use it in GitHub Desktop.
Arrow function with no parentheses
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
// The number parameter does not need to be surrounded by parentheses | |
let multiplyByItself = number => { | |
return number * number; | |
}; | |
alert(multiplyByItself(2)); // 4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment