admin 管理员组

文章数量: 1184232


2024年3月30日发(作者:vb编程设计例题100例高考题)

return false;

}

else if (typeof this[propName] != typeof object2[propName]) {

return false;

}

//If the property is inherited, do not check any more (it must be equa if both objects inherit it)

if(!Property(propName))

continue;

//Now the detail check and recursion

//This returns the script back to the array comparing

/**REQUIRES **/

if (this[propName] instanceof Array && object2[propName] instanceof Array) {

// recurse into the nested arrays

if (!this[propName].equals(object2[propName]))

return false;

}

else if (this[propName] instanceof Object && object2[propName] instanceof Object) {

// recurse into another objects

//("Recursing to compare ", this[propName],"with",object2[propName], " both named ""+propName+""");

if (!this[propName].equals(object2[propName]))

return false;

}

//Normal value comparison for strings and numbers

else if(this[propName] != object2[propName]) {

return false;

}

}

//If everything passed, let's say YES

return true;

}


本文标签: 编程设计 例题 高考题 作者