You are viewing a single comment's thread. Return to all comments →
function catAndMouse(x, y, z) { return Math.abs(z - x) === Math.abs(z - y) ? "Mouse C" : Math.abs(z - x) > Math.abs(z - y) ? "Cat B" : "Cat A" }
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 →
JavaScript One-Line Solution