Escribe en el campo de texto y verás el texto reflejado en tiempo real abajo.
<input type="text" id="campoTexto" placeholder="Escribe algo aquí...">
<div class="output" id="textoReflejado">Tu texto aparecerá aquí...</div>
<script>
document.getElementById('campoTexto').addEventListener('input', (evento) => {
const textoIngresado = evento.target.value;
document.getElementById('textoReflejado').textContent = textoIngresado || 'Tu texto aparecerá aquí...';
});
</script>