You are viewing a single comment's thread. Return to all comments →
in JavaScript,
function catAndMouse(x, y, z) { if (Math.abs(z-x) === Math.abs(z-y)) { return "Mouse C"; } if(Math.abs(z-x) < Math.abs(z-y)) { return "Cat A"; } if(Math.abs(z-x) > Math.abs(z-y)) { return "Cat B"; } }
Seems like cookies are disabled on this browser, please enable them to open this website
Cats and a Mouse
You are viewing a single comment's thread. Return to all comments →
in JavaScript,