The JavaScript Ternary Operator allows you to shorthand if/else statement and one-line the operations.
The ternary operator format is as follows:
{condition to evaluate} ? {code to execute if condition is true} : {code to execute if condition is false};
You can one line your entire operation like so:
isWeekend ? console.log("Party Time!") : console.log("Work time");
Or separate it on multiple lines like in the short above.
Happy coding :)