Created
October 27, 2017 17:31
-
-
Save backnotprop/2e85ce2ce68ab1923ee063964abb7739 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// eliminates two people from each others preference list | |
function eliminateChoices(rejecter, rejected) { | |
let remove1 = _.findIndex(rejected.choices, function(p) { return p.id == rejecter.id; }); | |
rejected.choices.splice(remove1, 1); | |
let remove2 = _.findIndex(rejecter.choices, function(p) { return p.id == rejected.id; }); | |
rejecter.choices.splice(remove2, 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment