See itExplore the model1 / 4
What does each line do?
An AI helper wrote this search box filter. Drag a description onto each highlighted line. Two descriptions do not fit anywhere.
1const input = document.querySelector('#search');2input.addEventListener('input', () => {3 const term = input.value.trim().toLowerCase();4 items.forEach((li) => { li.hidden = !li.textContent.toLowerCase().includes(term); });});
Labels
Drag a card, or tap it and then tap where it goes.
- 1
const input = document.querySelector('#search');Drop a label here - 2
input.addEventListener('input', () => {Drop a label here - 3
const term = input.value.trim().toLowerCase();Drop a label here - 4
items.forEach((li) => { li.hidden = !li.textContent.toLowerCase().includes(term); });Drop a label here
Next unlocks when this is right.