SCRIPT5039:使用IE9重新声明const属性

Art*_*ans 1 javascript internet-explorer-9

我正在IE浏览器中优化我的网站.除IE9外,一切正常.

我有一个类似于这个的功能:

 var history = new Array();


 function loadPage(page, parameters) {

    $(".dynamic_load").fadeOut(400, function(){

    $(this).fadeIn(400).html("loading").load(page, parameters,
    function(response){
    $(".dynamic_load").html(response).show();  });

                if (history.length > 5) {
                    history.shift();
                } 
                history.push(page); 

                                          });

 }
Run Code Online (Sandbox Code Playgroud)

我收到错误SCRIPT5039:const属性的重新声明,表示在线

 var history = new Array();
Run Code Online (Sandbox Code Playgroud)

这是什么意思?我没有在其他任何地方宣布它.它只是一个全局数组.

epa*_*llo 5

它可能与window.history冲突.将其重命名为其他内容并查看错误是否消失.