自己本子上能通过,慕课网的页面上显示一片空白

来源:1-6 编程练习

如如不动

2016-01-04 16:41

function arraysSimilar1(arr1, arr2){
            return arr1 instanceof Array && arr2 instanceof Array && arr1.length===arr2.length && (
                            (arr1.map(function(a){
                        if(a===null)
                            return "null";
                        if(a===window)
                            return "window";
                        if(a instanceof Date)
                            return "date";
                        else
                            return typeof a;
                    }).sort()).toString()===(arr2.map(function(a){
                        if(a===null)
                            return "null";
                        if(a===window)
                            return "window";
                        if(a instanceof Date)
                            return "date";
                        else
                            return typeof a;
                    }).sort()).toString()
                    )
        }


写回答 关注

2回答

JavaScript深入浅出

由浅入深学习JS语言特性,且解析JS常见误区,从入门到掌握

281100 学习 · 1020 问题

查看课程

相似问题