- let surname = prompt('Фамилия');
- let firstName = prompt('Имя');
- let middleName = prompt('Отчество');
- if(!surname) {
- surname = 'Гончаренко';
- }
- if(!firstName) {
- firstName = 'Сергей';
- }
- if(!middleName) {
- middleName = 'Николаевич'
- }
- alert(`${surname} ${firstName} ${middleName}`);
|