let和const命令let和const命令1.let命令基本用法let用来声明变量,它所声明的变量,只在let命令所在的代码块内有效。<pre<code{vara1;letb1;}a//1b//ReferenceError