6.3 C
New York
Tuesday, February 4, 2025

State of JavaScript: Highlights of the JavaScript developer survey




const set1 = new Set([1, 2, 3]);
const set2 = new Set([3, 4, 5]);
const differenceSet = set1.distinction(set2); // End result: Set {1, 2}

Object.groupBy()

One other new characteristic, Object.groupBy(), offers you a dead-simple mechanism for organizing objects in response to a property. As of the 2024 survey, 33% of respondents point out they’ve used it. That is a type of options you’ll probably ignore till you want it—and then you definately’ll discover it’s the right answer to your drawback:


const books = [
  { title: "The Hitchhiker's Guide to the Galaxy", genre: "Science Fiction" },
  { title: "Pride and Prejudice", genre: "Romance" },
  { title: "The Lord of the Rings", genre: "Fantasy" },
  { title: "1984", genre: "Science Fiction" }
];

const booksByGenre = Object.groupBy(books, (ebook) => ebook.style);
/* Provides you:
 {
   "Science Fiction": [
     { title: "The Hitchhiker's Guide to the Galaxy", genre: "Science Fiction" },
     { title: "1984", genre: "Science Fiction" }
   ],
   "Romance": [
     { title: "Pride and Prejudice", genre: "Romance" }
   ],
   "Fantasy": [
     { title: "The Lord of the Rings", genre: "Fantasy" }
   ]
 } */

Libraries and frameworks

The State of JavaScript survey captures an unlimited quantity of information in regards to the instruments and frameworks builders are utilizing, together with the present normal sentiment about every instrument and adjustments in sentiment and utilization over time.

This ingenious chart takes a large view, exhibiting sentiment change over time for construct instruments, entrance finish, again finish, meta-frameworks, and testing instruments. We’ll look extra carefully at just a few particular classes.



Supply hyperlink

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles