John Smith
john@example.com
---
title: "log2"
excerpt: "Computes the base 2 logarithm of the number."
layout: manual
Computes the base 2 logarithm of the number.
```js
log2(num: number) -> number
```
### Examples
const myVar = log2(4)
### Arguments
* `num`: `number` (REQUIRED)
### Returns
`number`