Ternary Comparison Assignment Operators

An idea ... Ternary Comparison Assignment Operators with Negation opperator

case1.js

let value = 10

// check the condition
if (value >= 11) ? value++ : value--; // if pass... increment value++ // if fail ... decrement value

// program to check pass or fail
console.log(`You ${value} the exam.`);

case2.js

let value = 10

// check the condition
if (value >= 11) ? !false : value^^; // if pass... increment value++ // if fail ... decrement value

// program to check pass or fail
console.log(`You ${value} the exam.`);

Notes

  1. Only ideas