<!--{ ids:[137], language:'JavaScript', type:'workshop', order: 11, name:'Expressions', description:'An expression is a unit of code that evaluates to a single value' }-->

### Objectives

After this exercise, you should be able to:

- Recognize an expression
- Explain what an expression is

### Example

An __expression__ is a unit of code that evaluates to a single value.

There are two types of expressions:

| 1                                              | 2                                                                  |
| ---------------------------------------------- | ------------------------------------------------------------------ |
| Expressions that assign a value to a variable. | Expressions that use more than one value to return a single value. |
| `name = "Sara"`                                | `3 * 14`                                                           |
| This expression uses the assignment operator to assign the value `"Sara"` to the variable `name`. The expression itself evaluates to `"Sara"`. | This expression uses the an arithmetic operator to multiply `3` by `14` without assigning the result, `42`, to a variable. |

### Exercise

How many expressions are in the following code?

```js
var item = "box";
var volume = 2 * 4;
```

Answer by assigning `numberOfExpressions` a value that is the number of expressions you find.

<!--{ ids:[137], language:'JavaScript', type:'workshop', order: 11, name:'Expressions', description:'An expression is a unit of code that evaluates to a single value' }-->

### Objectives

After this exercise, you should be able to:

- Recognize an expression
- Explain what an expression is

### Example

An __expression__ is a unit of code that evaluates to a single value.

There are two types of expressions:

| 1                                                                  | 2                                                                  |
| ------------------------------------------------------------------ | ------------------------------------------------------------------ |
| Expressions that use more than one value to return a single value. | Expressions that assign a value to a variable.                     |
| `3 * 14`                                                           | `var name = "Sara";`, <br>`var number = 3 + 3;`                        |
| This expression uses the an arithmetic operator to multiply `3` by `14` without assigning the result, `42`, to a variable. | The first expression uses the assignment operator to assign the value `"Sara"` to the variable `name`. <br><br>The second expression uses the assignment operator to assign the expression `3 + 3` to the variable `number`. |

### Exercise

How many expressions are in the following code?

```js
var shape = "rectangle";
var area = 2 * 4;
```

Answer by assigning `numberOfExpressions` a value that is the number of expressions you find.

Make expression explanation more clear
Make expression explanation more clear
