It is permissible to use the same name for the class and variable in the example class settingsBlock and the let settingsBlock object. Or the name of the object should not be in camelCase?
class settingsBlock extends elementByClass { open () { this.classList.toggle('settings_opened'); } } let settingsBlock = new settingsBlock('settings'); document.getElementsByClassName('settings-button')[0].onclick = function () { settingsBlock.open(); }; Poke, please, in the documentation. All the examples that have been seen use simple words like "menu, settings, button" to denote a variable, which is inconvenient in large projects.