Да, вопросы могут быть банальными, но не хочу терять темпОсвойте теорию, используйте ООП, ведите свою локальную подборку сниппетов/ЧаВо.
car=>speed:i,color:sОбычно я привык, что есть некий главный скрипт, который подключается к странице и в нём прописывается вся логика и по необходимости подгружаются все нужные скрипты, отделённые для легкости поддержки. Эти скрипты я и мог бы назвать модулями.здесь - как раз всё именно так!
<span class="super">Lorem ipsum dolor</span>.super::selection {
background: linear-gradient(0.25turn, #3f87a6, #ebf8e1, #f69d3c);
}ECMAScript 6 (ES6/ES2015) introduced theletandconstkeywords that support the declaration of block scope local variables. This means the variable will be confined to the scope of a block that it is defined in, such as anifstatement orforloop and will not be accessible outside of the opening and closing curly braces of the block. This is contrary tovardeclarations which are accessible outside blocks they are defined in. The difference betweenletandconstis that aconstdeclaration is, as the name implies, constant - a read-only reference to a value. This does not mean the value is immutable, just that the variable identifier cannot be reassigned.
"REX Tiny templater"str = "Когда <?=$var['m1']?> вышли из <?=$var['m2']?>, погода <?=$var['m3']?>.";
vars={'m1':'мы','m2':'парка','m3':'стала портиться'};
console.log(getvars(rex,str)); //Array[3] => ["m1", "m2", "m3"]
console.log(setvars(rex,str,vars)); //Когда мы вышли из парка, погода стала портиться.