const a = ‘const_a‘;
document.write(‘This is a const : ‘ + a);//IE11,FF31+,chrome35+,opera2+,safari6+,node0.10+,一个常量不可以被重新赋值,并且不能被重复声明
document.writeln(‘<hr>‘);
var arr = [‘apple‘,‘orange‘,‘banana‘];
for (var i of arr) {
document.writeln(i);
}
时间: 2024-10-27 03:14:24