Skip to content

Instantly share code, notes, and snippets.

@kdankov
Created October 31, 2024 09:59
Show Gist options
  • Save kdankov/603eb5f4a7b5df5ad6179332921b42ad to your computer and use it in GitHub Desktop.
Save kdankov/603eb5f4a7b5df5ad6179332921b42ad to your computer and use it in GitHub Desktop.
Month Printer
function solve(num) {
if ( num > 0 && num < 13 ) {
console.log(new Date(2000, num-1).toLocaleString('default', { month: 'long' }));
} else {
console.log('Error!');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment