Assertion: font's weight | /r/HasProperty | $weightinput.value
Facets:
Source sentences:
text: p { margin-top: 0; margin-bottom: 0; } JavaScript let weightLabel = document.querySelector('label[for="weight"]'); let weightInput = document.querySelector('#weight'); let sampleText = document.querySelector('.sample'); function update() { weightLabel.textContent = `font-weight: ${weightInput.value};`; sampleText.style.fontWeight = weightInput.value; } weightInput.addEventListener('input', update); update();