A data attribute is not a plain property of the element.
Acceptance criteria
- 1.#out should show 42.
A data attribute is not a plain property of the element.
const value = document.getElementById("btn")["data-user-id"]; document.querySelector('#out').textContent = value === undefined ? "not a property" : value;
Output ready when you are
Press Run to render your code, or Submit to validate your solution.