Last Updated: 1 year 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:
- multiple string checks
- for-of and for-in loops
- falsy checks
- ternary operator
- function calls
- switch shorthand
- fallback values
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
- https://vanillajstoolkit.com/polyfills/ (Chris Ferdinand is a javascript expert you should approach and learn from. His knowledge in Javascript and his pleasing character [ kind and helpful] will surely make you feel comfortable in your quest to learn Javascript.)
- https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill
Reminder:
- Keep your code DRY. Meaning Don’t Repeat Yourself. Learn how to abstract code.