File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # WTF JavaScript 极简教程: 3. valuetypes
2+
3+ WTF JavaScript 教程,帮助新人快速入门 JavaScript。
4+
5+ ** 推特** :[ @WTFAcademy_ ] ( https://twitter.com/WTFAcademy_ ) | [ @0xAA_Science] ( https://twitter.com/0xAA_Science )
6+
7+ ** WTF Academy 社群:** [ 官网 wtf.academy] ( https://wtf.academy/ ) | [ WTF Solidity 教程] ( https://github.com/AmazingAng/WTFSolidity ) | [ discord] ( https://discord.wtf.academy/ ) | [ 微信群申请] ( https://docs.google.com/forms/d/e/1FAIpQLSe4KGT8Sh6sJ7hedQRuIYirOoZK_85miz3dw7vA1-YjodgJ-A/viewform?usp=sf_link )
8+
9+ 所有代码和教程开源在 github: [ github.com/WTFAcademy/WTF-Javascript] ( https://github.com/WTFAcademy/WTF-Javascript )
10+
11+ ---
12+
13+ 这一讲,我们将介绍 JavaScript 中的数据类型。
14+
15+
16+
17+ ## 前言
18+
119> 变量用来存储值,它们有名字和数据类型,变量的数据类型决定了这些值在计算机内存中如何存储,JavaScript 中有6中简单数据类型(也称为** 原始类型** ):* Undefined* 、* Null* 、* Boolean* 、* Number* 、* BigInt* 、* String* 和 * Symbol* 。还有一种复杂数据类型 * Object* 。所有值都可以用上述 7 中数据类型之一来表示。需要注意的是,JavaScript 是一种弱类型语言,这意味着我们不用提前声明变量的类型,在程序运行时,类型会被自动确定。
220
21+
22+
323## typeof 操作符
424
525在 JavaScript 中,我们可以使用 ** typeof** 操作符来确定任意变量的数据类型。有如下两种使用方法:
You can’t perform that action at this time.
0 commit comments