In your firts example, you’re assigning the background color of the to the variable x but modifying x doesn’t affect the element because it simply reassigns x, without updating the actual style of the page.