Добавить ведущий в String JavaScript
const str = 'blah',
len = str.length,
space = 4;
console.log(str.padStart(len + space, ' '));
Defeated Dingo
const str = 'blah',
len = str.length,
space = 4;
console.log(str.padStart(len + space, ' '));