const input = document.querySelector('input');
const log = document.getElementById('log');
input.addEventListener('change', updateValue);
function updateValue(e) {
log.textContent = e.target.value;
}
Имена закрытых полей всегда начинаются с префикса «_» остальная часть имени описывается с помощью Camel Casing.
private int _samplePrivateField;