EcmaScript6学习之入门

时间:2014-11-04 06:48:31   收藏:0   阅读:235

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);
    }

本文出自 “Eason's hcc” 博客,请务必保留此出处http://hcc0926.blog.51cto.com/172833/1571448

原文:http://hcc0926.blog.51cto.com/172833/1571448

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!