js判断数组是否包含某个元素(元素为对象时不能判断),```dealArray(arr,obj){Array.prototype.S=String.fromCharCode(2);Array.prototype.in_array=function(e){varr=newRegExp(this.S+e+this.S);returnr.test(this.S+...
js判断数组是否包含某个元素(元素为对象时不能判断) dealArray(arr,obj){Array.prototype.S=String.fromCharCode(2);Array.prototype.in_array=function(e){varr=newRegExp(this.S+e+this.S);returnr.test(this.S+this.join(this.S)+this.S);};returnarr.in_array(obj);},console.log(this.dealArray(...