Created
November 2, 2020 15:21
-
-
Save ranamahmud/ee70a98da6c2111381c4c469432ec4ea to your computer and use it in GitHub Desktop.
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
const year = 2020 | |
var result; | |
if (year>2019){ | |
result = "Yes"; | |
} else{ | |
result = "No"; | |
} | |
console.log(result) | |
//Yes | |
var result = year > 2019 ? "Yes" : "No"; | |
console.log(result) | |
//Yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment