1、ES6 === let && const
来源:互联网 发布:jre windows x64 编辑:程序博客网 时间:2024/03/29 16:19
// let 的特性if(true){ var a = '苹果'; let b = '香蕉';}alert(a);// 苹果alert(b);// b is not defined{ let c = '橘子';}alert(c);// c is not defined
// const 的特性(常量)const d = '西瓜';alert(d);// 西瓜const d = '柠檬';alert(d);// Identifier 'd' has already been declared// const限制的是给这个常量赋值的动作,不是值本身const fruit = [];fruit.push('樱桃');fruit.push('车厘子');alert(fruit);// 樱桃,车厘子fruit = ['火龙果'];alert(fruit);// Error
阅读全文
1 0
- 1、ES6 === let && const
- es6学习-1 let&const
- ES6学习1(let与const)
- ES6学习笔记1--let、const
- ES6 学习笔记 1 let与const
- es6学习笔记1-let与const
- es6-1(let和const命令)
- [ES6语法1]let和const
- 1、let和const -ES6学习笔记
- 【ES6】let和const
- es6 箭頭函數 let, const
- es6---(let const)
- es6 let和const
- ES6---let与const
- ES6之let,const
- ES6-let,const
- [es6] let & const
- 【es6】 let & const
- Spring中的AOP基础
- 短信发送
- git上传本地Intellij idea 项目到github
- 数据分页
- Google-Guice入门介绍
- 1、ES6 === let && const
- saltstack安装及基本命令
- openCV基础函数imread第二个参数
- 电子阅读器模块
- 计蒜客-2017 计蒜之道 复赛-F-腾讯消消乐
- 复杂条件查询
- 权限管理模块
- 顺序表、结构体、深拷贝、重载运算符,快速排序的综合运用
- 在线电影订票系统