JavaScript introduced the class keyword in 2015 with the release of ES6. React made classes an indispensable language feature when they introduced support for using extends React.Component instead of React.createClass() in 2015, and removed support for React.createClass() entirely in 2017 in favor of classes. Today, classes are a fundamental part of JavaScript, and many new JavaScript devs don't remember a time before classes. In this article, I'll provide an overview of how classes work in JavaScript: how to declare classes, what features JavaScript provides with classes, and how inheritance works.

There's some confusion on the internet about what happens when you call Model.find() in Mongoose. Make no mistake, Model.find() does what you expect: find all documents that match a query. But there's some confusion about Model.find() vs Query#find(), setting options, promise support. In this article, I'll provide a conceptual overview of what happens when you call Model.find() so you can answer similar questions for yourself.

There's numerous ways to loop over arrays and objects in JavaScript, and the

Converting an arbitrary value to a string in JavaScript is surprisingly nuanced. There are 3 common ways to convert v to a string:

ES2019 was recently finalized, which means JavaScript has several new language features to learn. These features are now available in Chrome 73:

The Object Rest/Spread Proposal reached stage 4 in 2018, which means it will be included in a future iteration of the ECMAScript spec. It's also been included in Node.js LTS since Node.js 8, so you can safely start using it today.

Converting a string to a number in JavaScript is surprisingly subtle. With NaN, implicit radixes, and numbers vs Numbers, there are a lot of ways to shoot yourself in the foot. In this article, I'll cover the tradeoffs of parseFloat() vs Number() and Number.isNaN() vs isNaN(). I'll also describe how to enforce these rules with eslint.

Mongoose 5.4 was released on December 14, with 13 new features. The overarching theme for 5.4 is making Mongoose SchemaTypes more configurable, but that isn't the whole story. Mongoose 5.4 has several new features that will help you make your apps more robust and concise. In this article, I'll cover the new Model.events property and the new count option for virtual populate.

Sponsored by #native_company# - Learn More
#native_title# #native_desc#
#native_cta#