What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-05 18:41:02
node log centered
// Center text horizontally function logXCentered(s) { console.log(' '.repeat(process.stdout.columns / 2 - s.length / 2) + s); } logXCentered('This text is centered horizontally.'); // Center text both, horizontally and vertically function logCentered(... Add solution