Build a utility that formats numbers for display. Handle currency, percentages, and large numbers with commas.
function formatMoney(cents) {
return "$" + (cents / 100).toFixed(2);
}
console.log(formatMoney(1999)); // "$19.99"
Start with basic cases, then add edge case handling for negative numbers and zero.