Basic JavaScript


You should use:

  • ES6 -
  • JSDoc - JSDoc is used to annotate JavaScript source code files with API documentation and types.
    VSCodium Supports type checing JS files annotated with JSDoc.
    IntelliJ IDEA, NetBeans and RubyMine understand JSDoc syntax
  • ESM - Use ECMAScript module loader

  • CSS variables for theming (like implementing dark mode)
  • SVG - Use SVGs in JavaScript for very fast rendering of icons etc
  • rems- Use rems to specify font sizes in CSS. It’s relative to root html element (not parent element).
  • snowpack - Convert npm packages into single-file ES modules. Snowpack’s web_modules build step produces a single-file ESM bundle for each NPM lib

Advanced JavaScript