# The Math Object

The various abilities of the Math object can be found in various [locations online](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math). Here is a sampling of what you might use.

| Code                       | Description                                                                                                                                                                                                            |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Math.PI`                  | Returns 3.141592653589793                                                                                                                                                                                              |
| `Math.pow(base, exponent)` | Returns the `base` raised to the `exponent`                                                                                                                                                                            |
| `Math.sqrt(number)`        | Returns the square root of the given `number`                                                                                                                                                                          |
| `Math.round(number)`       | Rounds the given `number` to the nearest integer                                                                                                                                                                       |
| `Math.ceil(number)`        | <p>Returns the <code>number</code> rounded up to the nearest integer</p><p>Ex. <code>Math.ceil(5.1)</code> returns <code>6</code></p>                                                                                  |
| `Math.floor(number)`       | <p>Returns the <code>number</code> rounded down to the nearest integer</p><p>Ex. <code>Math.floor(5.8)</code> returns <code>5</code></p>                                                                               |
| `Math.random()`            | <p>Returns a <a href="https://en.wikipedia.org/wiki/Pseudorandom_number_generator">pseudorandom</a> decimal number between 0 and 1. <br>Use it in conjunction with <code>Math.floor()</code> to return an integer.</p> |
