Acara Perubahan Input di JavaScript

const input = document.querySelector('input');
const log = document.getElementById('log');

input.addEventListener('change', updateValue);

function updateValue() {
  log.textContent = target.value;
}
Lucky Loris