The Machinery of Frontend

I. Rendering the Page

II. Interacting with the DOM

III. Handling Input with JavaScript (Example)

<!-- page.html -->
<input/>
<div></div>
<script src="app.js"></script>

// app.js
let content = '';
const input = document.querySelector('input');
const div = document.querySelector('div');

function handleInput() {
  content = input.value;
  div.textContent = content;
}

input.oninput = handleInput;
Cedric Manchau