# Control Structures
In Web 1 you learned about the following **control structures**:
1. IF Statements (and all of their variations)
1. While Loops
1. For Loops

Now you will explore the control structures that are listed below. 
For each one, write a brief paragraph that describes the control
structure and the situations when you would use it.
Also, include a fun and imaginative code sample that demonstrates 
the control structure.

## Switch/Case Statement
The switch statement is an efficient way to check a single variable against multiple posible cases. It is often used as a cleaner, more readable alternative to a long chain of if else ifi statements when you are comparing one value ot several specfific options. Once a match is found, the code under that case executes until it hits a break.
```js
const dragonMood = "hungry";

switch (dragonMood) {
  case "sleepy":
    console.log("The dragon snores, accidentally singeing the carpet.");
    break;
  case "hungry":
    console.log("The dragon looks at you and reaches for the BBQ sauce.");
    break;
  case "playful":
    console.log("The dragon wants to play fetch with a boulder.");
    break;
  default:
    console.log("The dragon is just vibing.");
}
```

## For/In Loop
the For in loop is desgined to iterate over the propeties of an object. Instead of counting trough numbers like a standard for-loop, it looks are every property name inside an object one by one.

```js
const car = {
  make: "Toyota",
  model: "Camry",
  year: 2022
};

for (let key in car) {
  console.log(key + ": " + car[key]);
}

```

## Conditional Operator (aka Ternary Operator)
This is a shortcut for a simple choice. It asks a Yes/No question. If the answe  the second thing.

```js
let age = 18;
let canVote = (age >= 18) ? "Yes" : "No";

console.log(canVote);
```

