Last active
December 1, 2017 08:40
-
-
Save perjansson/081c9f30878a33d96e511af8bd365aea to your computer and use it in GitHub Desktop.
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
| var cars = this.cars.map(car => ... | |
| var message = 'No cars' | |
| if (cars.length) { | |
| var randomCar = null | |
| message = `The best car is ${randomCar}` | |
| ... | |
| // becomes | |
| const cars = this.cars.map(car => ... | |
| let message = 'No cars'; | |
| if (cars.length) { | |
| const randomCar = null; | |
| message = `The best car is ${randomCar}` | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment