thepracticaldev.com thepracticaldev.com

Useful JavaScript Arrays Methods

Originally posted on bigsondev.com Arrays exist in every programming language. It's a data structure best suited for storing multiple values. And, for doing various operations on these values, often called as a collection. Introduction It's always best to learn by doing. Take a look at the below code example, study, and execute it step by step. // Create an array of 3 items using [ ] brackets const friends = ["John",...

thepracticaldev.com thepracticaldev.com

8 Useful JavaScript ES2019 Features to Know About

The ES2019 specification may have been a smaller addition to JavaScript, but it still brought some interesting features. This tutorial will show you eight ES2019 features that can make your life easier. These features include trimStart(), trimEnd(), flat(), flatMap(), Object.fromEntries() and more. String.prototype.trimStart() and String.prototype.trimEnd() If you've ever worked with strings there is chance you had to deal with...