Opening your workspace…
Workspace/Coding room
Opening your workspace…
A friend in the Nether needs another pair of gold boots, and the fitting bell only gives a "ding" when every boot in the pile can be matched with a partner. Given the number of individual boots, return the string "ding" if they can all be paired, or "clunk" if one boot is left over. An empty pile earns a ding.
7Output"clunk"Seven boots make three pairs with one boot left.
8Output"ding"Eight boots make four complete pairs.
How many boots are left after making as many pairs as possible?
/** @param {number} boots * @returns {string} */ function solve(boots) { // Write your solution 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"