function study(your,tests){ return your.map(function do(not,cheat){ var please = "CBA"; return please[not*2+tests[cheat]]; }); }