Opening your workspace…
Workspace/Coding room
Opening your workspace…
Overnight, someone wrote the winter menu backwards in the frost on the taproom window. A small scarf and a set of very tidy pawprints sit on the sill. Given the line as it appears from the street, return its characters in reverse order so the morning crew can read it. Spaces and punctuation count as characters too.
"!aoCoC toH"OUTPUT"Hot CoCoa!"Reading from the right gives Hot Cocoa!
" paT"OUTPUT"Tap "The space at the start moves to the end.
Where will the last character on the glass appear on the readable menu?
/** @param {string} line * @returns {string} */ function solve(line) { // 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.
"!aoCoC toH""Hot CoCoa!"