Web-Dev-For-Beginners icon indicating copy to clipboard operation
Web-Dev-For-Beginners copied to clipboard

Added nested ternary expression

Open mhetreayush opened this issue 3 years ago • 1 comments


Added nested ternary expression with a note:

  • Nested Ternary expression:

    let variable = condition ? <return this if true> : 
                  <return this if 1st condition is false but this condition is true> :
                  <return this if first two conditions are false>
    
  • Better to use if..else statements if there are 3 or more conditions.


mhetreayush avatar Oct 15 '22 04:10 mhetreayush

This PR has not seen any action for a while! Closing for now, but it can be reopened at a later date.

github-actions[bot] avatar Dec 14 '22 08:12 github-actions[bot]