Last active
May 16, 2019 22:09
-
-
Save nadeesha/0105c5cb4a1c56be7497a9b92a8fb9c1 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
function getCarConfig(car) { | |
let description; | |
let newPrice; | |
if (car.rating > 4) { | |
description = "good car"; | |
newPrice = car.price + 1000 * car.rating; | |
} else { | |
description = "bad car"; | |
newPrice = car.price; | |
} | |
return { | |
description, | |
newPrice, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment