The DOM: selecting and changing elements
Comes up in: Recruiter screen, UI coding
This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.
What it covers
- what the DOM is (tree of nodes)
querySelector(All)textContentvsinnerHTML(and the XSS warning)classList- attributes
createElement,append,remove
Words you will know
What you will practise
- to-do list rendering (worked)
Interview questions this answers
- What is the DOM?
- What is the difference between
textContentandinnerHTML? Why caninnerHTMLbe dangerous?