/**
* 1.number
* 十六进制 十进制 科学计数法 小数 分数
*/
var a = 10;
var b = 0x11; //0x开头表示十六进制 0-9 a-f
var c = 011; //0开头表示八进制
var d = 3e10; //科学计数法
var e = 18/5; //分数
console.log(a,b,c,d,e, typeof a);
/**
* 2.string
*/
var a = '10'
var b = 'EVAN'
console.log(a,b,typeof a, typeof b);
/**
* 3.boolean true false
*/
var a = true, b = false;
console.log(a,b,typeof a,typeof b);
/**
* 4.undefined 未定义 声明变量不初始化 声明变量将其初始化为undefined
*/
var a;
var b = undefined;
console.log(a,b,typeof a, typeof b);
/**
* 5.null 空引用
*/
var a = null;
console.log(a, typeof a); //数据类型的结果 object
/**
* 6.symbol 表示一个独一无二的值
*/
var a = Symbol('name');
console.log(a,typeof a);
//===全等 比较数据类型 比较值
console.log(9007255619989992===9007255619989993); true
/**
* 7.bigint 类型 超出js计算范围以外的数可以使用bigInt处理
*/
var a =BigInt(9007255619989992n);
console.log(a,typeof a);
// typeof 检测结果 number string boolean undefiend obejct symbol bigint
/**1.引用数据类型
* Obejct 对象
*/
var obj = {
name:"zhangan",
age:12
};
console.log(obj,typeof obj);
/**
* 2.函数 function add(形式参数){} add(实际参数)
* typeof function(){} =>function
*/
var a = function(a,b){
//function add(a,b=>var a,b;)
console.log(a+b);
}
// 调用函数
a(2,3);
console.log(a,typeof a);
/**
* Array 数组 typeof结果 object
*/
var a = [1,2,3,4,5];
console.log(a,typeof a);