code_notes
71 subscribers
136 photos
1 video
134 links
учусь делать веб

обратная связь: t.me/dmorenogogoleva
Download Telegram
также Вадим советует использовать инпуты вот так, чтобы делать кастомную валидацию, сохраняя удобный ввод
лучший хоткий для девтулзов


https://twitter.com/cjamcl/status/1250700753011793920
очень очень хорошие статьи по верстке

https://every-layout.dev/

все прочитала и по второму разу читаю
JS is backwards-compatible only

HTML and CSS is forwards-compatible only
So what do these nitty-gritty details boil down to? Step back and consider the entire flow of a JS source program:

1. After a program leaves a developer's editor, it gets transpiled by Babel, then packed by Webpack (and perhaps half a dozen other build processes), then it gets delivered in that very different form to a JS engine.

2. The JS engine parses the code to an AST.

3. Then the engine converts that AST to a kind-of byte code, a binary intermediate representation (IR), which is then refined/converted even further by the optimizing JIT compiler.

4. Finally, the JS VM executes the program.
эвристический — не являющийся гарантированно точным, но достаточный для решения задачи
what is closure

closure is when a function remembers and continues to access variables from outside its scope, even when the function is executed in a different scope.
what is hoisting

when all variables declared anywhere in a scope are treated as if they're declared at the beginning of the scope
JS programs are parsed before any execution begins
картинка про скоупы
любой html id считается за глобальную переменную
это легаси из древних времён, использовать не рекомендуется
шок-контент. каждый файл в ноде это модуль, а каждый модуль это функция

записать что-то в глобальную переменную можно только через`global`
как называется глобальный объект в разных окружениях:

браузер — window
нода — global
веб-воркер — self


скоро это всё должно замениться на кроссокруженческий globalThis