Opening your workspace…
Workspace/Coding room
Opening your workspace…
Two mice run the brewery cloakroom. Pip hangs mittens in pairs. Dot handles the awkward conversation when a guest goes home with one cold paw. The bell above their desk asks, “Does every mitten have a partner?” Given the number of mittens, return the string "ding" if they can all be paired or "clunk" if one is left over. An empty basket earns a ding.
7OUTPUT"clunk"Three pairs leave one mitten for Dot.
8OUTPUT"ding"Pip hangs four complete pairs.
How many mittens are left after making as many pairs as possible?
/** @param {number} mittens * @returns {string} */ function solve(mittens) { // Write your answer here. }
Tab inserts two spaces. Shift+Tab outdents. Use the arrow keys and Tab to choose a suggestion. Press Escape, then Tab, to leave the editor. Press Control or Command with apostrophe to run samples or with Enter to submit.
7"clunk"