Best of JavaScriptApril 2022

  1. 1
    Article
    Avatar of hackernoonHacker Noon·4y

    The Array Methods Coming to JavaScript in 2022

    A new specification has been written which will give us a host of new ways to copy and then change an array. This proposal is called the "Change Array by Copy" proposal. Currently, these features are not supported in any major browser or Node.JS version. We can expect them to be supported soon though since this specification has reached Stage 3 in the Javascript proposal process.

  2. 2
    Article
    Avatar of logrocketLogRocket·4y

    How to detect dead code in a frontend project

    Using ESLint to detect and remove dead code in your frontend project.Using webpack for dead code detection.Using TypeScript to detect dead code.Detect unused dependencies with depcheck.Using the no-unused-vars rule to detect unused variables in our files.

  3. 3
    Article
    Avatar of medium_jsMedium·4y

    Automatic Dark Mode With JavaScript

    Detecting Users’ OS Dark Mode Preference Using matchMedia() using JavaScript. For many users, dark mode provides a more eye-friendly interface with fewer white tones that can cause eyestrain. In JavaScript, you can takes advantage of the Window interface’s match media() method to check the value of the prefers-color-scheme CSS feature.

  4. 4
    Article
    Avatar of crioCrio.Do·4y

    Fresh and Trendy JavaScript Projects for Beginners

    JavaScript is the most popular programming language in the web development space. A large number of developers use JavaScript on a daily basis but are unaware of what happens behind the scenes. For newcomers and even experts in the industry, JavaScript is quite complex and perplexing. To become a JS Master, the most efficient strategy is to learn by doing.

  5. 5
    Article
    Avatar of 30seconds30 seconds of code·4y

    30 seconds of code

    Use Array.map() and Array.filter() to map each element to a rank using the provided comparator function. Use Array.prototype.reverse() to reverse unique values in an array based on a provided comparators function. Array Finds the lowest index at which a value should be inserted into an array in order to maintain its sorting order.

  6. 6
    Article
    Avatar of towardsdevTowards Dev·4y

    Web scraping with JavaScript and Node.js

    Web scraping is the process of extracting content and data from a website. Many industries use web scraping for market analysis, price comparison, and machine learning. We are going to build a simple web scraper with javascript and Node.js. We will use it to scrape information related to a product, specifically the product’s name, price, and image.

  7. 7
    Article
    Avatar of freecodecampfreeCodeCamp·4y

    How to Remove a Property from a JavaScript Object

    There are two ways to remove a property from a JavaScript object. There's the mutable way of doing it using the delete operator, and the immutable way of do it using object restructuring. Let's go through each of these methods in this tutorial. If you have any questions, feel free to reach out to me!

  8. 8
    Article
    Avatar of telerikTelerik·4y

    Top Frontend Developer Tools for Beginners in 2022

    Frontend development is the process of designing and building applications that run on the web using web technologies such as HTML, CSS and JavaScript. In this post, we will take a look at a few tools that frontend developers cannot do without in 2022 and what I love about them. If you are a developer or looking to become one, this is a good piece to get started.

  9. 9
    Article
    Avatar of hashnodeHashnode·4y

    How to parse JSON in JavaScript

    JSON is a text-based data exchange format. It is a collection of key-value pairs with a few rules to keep in mind. The key must be a string type and enclosed in double-quotes. The value can be of any type, String, Number, Object, Array, and null.

  10. 10
    Article
    Avatar of towardsdevTowards Dev·4y

    JavaScript Promises

    Fetch() is the JavaScript method used to get and post data to the server. It takes one required argument, the path(url) to the resource we want to fetch. A fetch request returns a Promise, which goes from pending to eventually fulfilled, resolving in a Response object. Then the program handles the response using the .then and .catch methods.

  11. 11
    Article
    Avatar of freecodecampfreeCodeCamp·4y

    Learn CRUD Operations in JavaScript by Building TODO APP

    Learn how to do CRUD Operations in JavaScript by making a Todo App. In our case, we will have 4 options to create tasks, read tasks, update tasks, or delete tasks. For that, let's create a very very simple Social Media Application. We will be following these steps below.

  12. 12
    Article
    Avatar of honeypotHoneypot·4y

    JavaScript Array.map() In The Real World

    The Array.map() method is frequently used in all types of front-end codebases. Once you learn how it works you’ll find yourself reaching for it time and again to solve many common array processing patterns. In this article we will take the example we built and show how map() can help us.

  13. 13
    Article
    Avatar of gcgitconnected·4y

    Learn Javascript EventListener while traveling in the desert

    Javascript is a versatile language and can be used in many different environments. The most common environment is the browser but it can also be used on servers, mobile, and many others. When you are using Javascript in a browser you have access to a special set of methods. These methods provide, for example, methods to manipulate the DOM or its events.

  14. 14
    Article
    Avatar of logrocketLogRocket·4y

    How to escape from memory leaks in JavaScript

    A memory leak is an allocated piece of memory that the JavaScript engine is unable to reclaim. Memory leaks are caused due to flaws in your logic, and they make way for poor performance in your application. In high-level languages like JavaScript, memory release is handled by the garbage collector. If you understand how memory allocation and release happens in JavaScript, it’s very easy to solve memory leaks.

  15. 15
    Article
    Avatar of changelogChangelog·4y

    This is JS Party!

    JS Party is a weekly celebration of JavaScript and the web. We play games like Frontend Feud and debate hot topics like should websites work without JS? We’d love to have you with us. Listen and subscribe today. We're on Twitter @JSParty.

  16. 16
    Article
    Avatar of phProduct Hunt·4y

    NFT.JS - A Javascript library to implement NFTs

    Don't reinvent the wheel and consider using NFT.JS and it's a cool thing that you can do. Building a NFT marketplace ? Developing a Decentralized social platform or any other Dapps that needs to implement NFTs ? NFTJS is a free, open source tool that can be used by anyone.

  17. 17
    Article
    Avatar of 30seconds30 seconds of code·4y

    30 seconds of code

    Use Array.prototype.map() to create the transpose of the given two-dimensional array. Use Array to group array elements based on function JavaScript, Array Creates an array of elements, ungrouping the elements in an array produced by zip and applying the provided function.

  18. 18
    Article
    Avatar of infoworldInfoWorld·4y

    8 great new JavaScript language features in ES12

    ECMAScript 2021 adds the replaceAll() and promise.any() methods. The replace all() method works exactly like replace() but applies to all occurrences in the string. promise.all() lets you observe all promises that resolved in a collection, even if there were intervening errors.

  19. 19
    Article
    Avatar of freecodecampfreeCodeCamp·4y

    How to Check if a Property Exists in a JavaScript Object

    In this article, I will show you three ways to check if a property exists in a JavaScript object. The hasOwnProperty() method will check if an object contains a direct property. The in operator will return true for both direct and inherited properties that exist in the object or its prototype chain.

  20. 20
    Article
    Avatar of logrocketLogRocket·4y

    Essential VS Code extensions for TypeScript

    VS Code has rich extensions to help configure and use TypeScript easily. TypeScript ESLint is used to lint your code and check basic code guidelines. By using it, you’re ensuring basic code quality and integrity. Let’s understand how to configure it manually.

  21. 21
    Article
    Avatar of logrocketLogRocket·4y

    Understanding JavaScript’s Array.GroupBy

    ECMAScript is the standard that defines the different APIs that can be used when coding with JavaScript. Grouping data is very common, but currently unavailable in the standard JavaScript Array API. Justin Ridgewell raised a proposal for adding groupBy to the Array API in June 2021. This proposal is currently in Stage 3, which means it’s considered complete.

  22. 22
    Article
    Avatar of honeypotHoneypot·4y

    JavaScript Array.forEach() In The Real World

    In this article, we will take the example established in the previous articles and show how forEach() can help us. We will take a deep look at how the method works, why we need it, and what it would look like in a typical modern front-end codebase. We are working on the codebase of an online shop I created. You can check out the web app and see our examples in action.

  23. 23
    Article
    Avatar of freecodecampfreeCodeCamp·4y

    How to Get Started With React – A Beginner's Guide

    React (also known as React.js or ReactJS) is a free and open-source front-end JavaScript framework for creating UI components-based user interfaces. In this article, we will see reasons why you should learn React and how to get started with it.

  24. 24
    Article
    Avatar of freecodecampfreeCodeCamp·4y

    What is Memoization? How and When to Memoize in JavaScript and React

    In this article we will talk about memoization, an optimization technique that can help make heavy computation processes more efficient. We will start by talking about what memoization is and when it's best to implement it. Later on we will give practical examples for JavaScript and React.

  25. 25
    Article
    Avatar of logrocketLogRocket·4y

    Modern, faster alternatives to ESLint

    In this article, we will look at specific open source libraries that either serve as alternatives to ESLint or can be integrated with ESLint. Some of these libraries are built to outright replace ESLint and improve on aspects such as performance or developer experience. We’ll focus on libraries that work well within the JavaScript ecosystem.