<input type="text" class="question">
<input type="text" class="answer">
let question = document.querySelector('.question')
let answer = document.querySelector('.answer')
question.addEventListener('input', (e) => {
e.preventDefault()
answer.value = question.value
})