Answers for "javascript 1 line if"

7

js one line if

const condition = true;
// (condition) ? if : else
(condition) ? console.log("it is true") : console.log("it is false");
Posted by: Guest on April-27-2021
10

javascript 1 line if

(lemons) ? alert("please give me a lemonade") : alert("then give me a beer");
Posted by: Guest on September-10-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language