Похожие чаты

I have a question when i initialize a variable with const x

= document.getElementById('text-field').value

console.log(x)

but this x will not work with click event it will give empty why is that?

3 ответов

4 просмотра

Wat?

Muhammad-Arsalan Автор вопроса

Ok i got it

Muhammad-Arsalan Автор вопроса
Simen
Wat?

I was getting input value in x But on click event i was expecting to have new value but it wont because the x has a value on load

Похожие вопросы

Обсуждают сегодня

Карта сайта