Answers for "if condition shorthand javascript w3schools"

33

javascript if shorthand

condition ? doThisIfTrue : doThisIfFalse

1 > 2 ? console.log(true) : console.log(false)
// returns false
Posted by: Guest on May-21-2020
8

shorthand if statment in js

isLoggedIn ? "Logout" : "Login";
Posted by: Guest on April-19-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language