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