In this code modification, I tried to make the code look simpler, so I optimized several of them, so I created a class that makes it easy to maintain updates later, which is easier to do. Arrived:
Css: element style: display attribute
getElementById() returns an
Element object representing the element whose
id property matches the specified string. Since element IDs are required to be unique if specified, they’re a useful way to get access to a specific element quickly.