Skip to content

Instantly share code, notes, and snippets.

@BennisonDevadoss
Created June 4, 2022 19:50
Show Gist options
  • Save BennisonDevadoss/0ca8b1f69ad4299dd89233a6cc12af54 to your computer and use it in GitHub Desktop.
Save BennisonDevadoss/0ca8b1f69ad4299dd89233a6cc12af54 to your computer and use it in GitHub Desktop.
/* EXAMPLE ONE */
const age = 21;
let increament = 1;
const result = age > 0 || inceament++
console.log(result); // true
console.log(increament); // 1
/* EXAMPLE TWO */
const value = 10;
let decrement = 10;
const summary = value < 10 || decrement--;
console.log(summary); // true
console.log(decrement); // 9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment