How to make the output that fits into the prompt ? Now displays undefined , and I don’t understand why it doesn’t see name and nick
let box = document.querySelector('.box'); let user = { 'name': prompt('Ваше имя: ', ''), 'nick': prompt('Ваш ник: ', ''), 'all': function(welcome, status) { box.innerHTML = welcome + ', ' + status + ' ' + this.name + ' ' + this.nick; } } let userAll = user.all; userAll('Hi', 'Mr.'); <div class="box"></div>
user.all('Hi', 'Mr.');? - Regent