let a = 'дрель| домофон|пила| топор |ручной молоток'
a = a.replaceAll(' ', '').replaceAll('|', ' | ')
console.log(a)
let string = prompt('Напишешь что-нибудь?', 'привет');
let stars = ''
for (let i = 0; i < string.length + 4; i++) {
stars = stars + '*'
}
console.log(stars)
console.log(`* ${string} *`);
console.log(stars)