Last active
August 19, 2016 08:03
-
-
Save kdabir/8629b06eb6c30ae4d74e244c56d6bc28 to your computer and use it in GitHub Desktop.
Use at least one of following - a semicolon to terminate expression or an explicit return keyword.
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
// In a function foo be careful when you have something like following: | |
// Doesn't Work - implicit return and no semicolon | |
const myStr = "hello-world".split('-').join('_') | |
`${myStr}/` | |
// Works | |
const myStr = "hello-world".split('-').join('_'); | |
return `${myStr}/`; | |
// works | |
const myStr = "hello-world".split('-').join('_'); | |
`${myStr}/`; | |
// works | |
const myStr = "hello-world".split('-').join('_') | |
return `${myStr}/`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment