> ## Documentation Index
> Fetch the complete documentation index at: https://blog.sumathi.dev/llms.txt
> Use this file to discover all available pages before exploring further.

#  Conditional Expressions

* IF
  * just if `if {}`
  * `if () {} else {}`
  * `if () {} else if () {} else {}`

* Switch
  * checks each case and executes
  * break is compulsary
    * else every case runs after the sucess case
  * ```let k = 5; theme={null}
      switch (k) {
          case 10 :
              console.log("value is  10")
              break; // break is needed else every case runs after sucess case
          case 5 :
              console.log("value is 5")
          default :
              console.log("vaue is not 5 or 10")
      }
    ```

* Ternary
  * Evalute a condition and do some thing
  * Condition ? True Action : False Action
  * ```let k = 5 ; theme={null}
      console.log("You can ", k < 18 ? "not drive": "drive")
    ```
