---
title: Use typeof to Check the Type of a Variable
localeTitle: 使用typeof检查变量的类型
---
## 使用typeof检查变量的类型

*   使用`console.log(typeof variable)`显示所需变量的类型。

## 解：

```javascript
console.log(typeof seven); 
 console.log(typeof three); 

```