returnJSON.stringify(this.attributes) === JSON.stringify(otherSock.attributes);
}
}
functionpairSocks
(socks) {
let unSearchedSocks = socks;
let unmatchedSocks = [];
let pairedSocks = [];
for (let newSock of unSearchedSocks) {
let matchedSock = null;
for (let unmatchedSock
of unmatchedSocks) {
if (unmatchedSock.isPairOf(newSock)) {
matchedSock = unmatchedSock;