Which fix removes the bug?
const btn = document.querySelector('#go');
btn.disabled = 'false';
- Assign the boolean false
- Remove the attribute
- Compare with === false
- Use setAttribute here
Any non-empty string is truthy, so the string 'false' leaves the button disabled.
Play Problem Solving ▸