Javascript: Important Notes and Links

Last Updated: 7 months ago by BrodNeil

JavaScript is one of the most popular programming languages in the world and is used to create interactive websites, applications, and more. It has been around for more than two decades and continues to be developed by a large community of developers. With its wide range of uses, it’s important to stay up-to-date with JavaScript to get the most out of it. This article provides some important notes and links related to JavaScript that are essential for any experienced or aspiring developer.

Google recommends moving JavaScript below HTML headers

John Mueller of Google explains that this will ensure search engines can clearly understand what your website is about.
Why it matters? It has a positive SEO impact.

Source: https://www.searchenginejournal.com/googles-john-mueller-move-javascript-below-html-headers/476024/

7 Shorthand Optimization Tricks for JavaScript Developers

These tricks can help you write better code for the following: 

  1. multiple string checks
  2. for-of and for-in loops
  3. falsy checks
  4. ternary operator 
  5. function calls
  6. switch shorthand
  7. fallback values

Source: https://dev.to/ruppysuppy/7-shorthand-optimization-tricks-every-javascript-developer-should-know-4fj5

Javascript Events and addEventListener

Here is a full list of available events on the Mozilla Developer Network.

You can use addEventListener to listen for events and interactions in an element.

Polyfills and How to Use Them


  • Keep your code DRY. Meaning Don’t Repeat Yourself. Learn how to abstract code.

Tara Mae Dela Cruz is a passionate writer and storyteller hailing from the Philippines. With a love for words and a vivid imagination, she weaves compelling tales that transport readers into captivating worlds. Her writing style is characterized by its lyrical prose and deep emotional resonance, drawing inspiration from her own experiences as well as the diverse cultures she encounters. Tara's work often explores themes of identity, family dynamics, and the power of human connection. When she's not writing, you can find Tara exploring new hiking trails or curled up with a good book, always seeking to broaden her horizons and find inspiration in the world around her.