how to print value of an input immedeately char by char to docment by javascript?
i tried by this code by it returned undefined in the output by each characters!
const field = document.getElementById(“input-field”), preview = document.getElementById(“preview”);
field.input = ()=>{
preview.innerHTML += this.value;
}
the output is undefiend !!!