1 ES6 第七中数据类型 Symbol
<!-- ES第七中数据类型 Symbol-->
<script>
// 创建 symbol
let s = Symbol()
console.log(s, typeof Symbol)
console.log(s, typeof s)
let s2 = Symbol("我要上高速")
let s3 = Symbol("我要上高速")
console.log(s2 == s3)
console.log(s2 === s3)
let s4 = Symbol.for("上高速")
let s5 = Symbol.for("上高速")
console.log(s4==s5)
console.log(s4===s5)
// 不能与其他数据类型使用
// USONB you are so niubility
// JS数据类型
// undefined string symbol object null number boolean