-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataType.js
More file actions
26 lines (23 loc) · 693 Bytes
/
DataType.js
File metadata and controls
26 lines (23 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* 数据类型
number类型-- - 字符串类型-- - 布尔类型-- - undeFined类型
字符串,字符串,就是字符能串起来的。
*/
// number类型
var myname = 9527;
console.log(myname);
// 字符串类型
var myname = '帅哥';
console.log(myname);
// boolean类型
var myname = true;
console.log(myname);
// undefined类型
var myname = undefined;
console.log(myname);
console.log(typeof myname);
/*
动态类型的语言 :
像这种可以存不同类型数据的这种变量的语言,叫做动态类型的语言。
静态类型的语言 :
像那些变量只能存固定 存一种数据类型的这种语言,叫做静态类型的语言。
*/