-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Labels
Out of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Inspiration: Kotlin
This code below
if (age < 18) {
message = "You are too young to vote"
} else if (age === 100) {
message = "Congratulations"
} else {
message = "You can vote"
}can be converted like this for productivity and brevity
message = if (age < 18) {
"You are too young to vote"
} else if (age == 100) {
"Congratulations"
} else {
"You can vote"
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Out of ScopeThis idea sits outside of the TypeScript language design constraintsThis idea sits outside of the TypeScript language design constraintsSuggestionAn idea for TypeScriptAn idea for TypeScript