问答详情
源自:1-6 编程练习

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

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


提问者:如如不动 2016-01-04 16:41

个回答