A barebones text console in JavaScript