Learn JavaScript Arrays

If you already understand the basics of JavaScript arrays, it’s time to take your skills to the next level with more advanced topics. In this series of tutorials, you’ll explore intermediate-level topics for programming with arrays in JavaScript.

JavaScript Arrays From Scratch

Tuts+ has some wonderful free courses to help you brush up on the basics of JavaScript arrays or learn them from scratch. 

To take you beyond the basics, these tutorials will provide you will give you an in-depth knowledge on working with JavaScript arrays: 

1. Adding and Removing Elements From Arrays in JavaScript

In this article, we’ll take a look at various ways to add and remove elements from an array in JavaScript.

2. Sorting Values with JavaScript

Sorting arrays is one of the most common tasks you’ll do when programming in JavaScript. Therefore, as a JavaScript programmer, it’s essential that you learn how to correctly sort an array because you’ll be doing it a lot in real-life projects. And the wrong sorting technique can really slow your app down!

3. Searching Arrays in JavaScript

In this tutorial, you will learn how to search for and find data within JavaScript arrays by using the indexOf(), lastIndexOf(), find(), findLast(), includes(), some(), and every() methods.

4. Converting and Transforming Arrays in JavaScript

In this tutorial, you will learn about the tools JavaScript provides to merge, copy, convert, and filter arrays. Before we begin, however, it is important that I point out that while the instructor uses the terms “merge”, “convert”, “transform”, and “filter”, very rarely do these processes change an existing array. Instead, they create a new array that contains the merged, converted, transformed, and filtered data—leaving the original array in its unchanged and pristine format.

5. Merge Arrays in JavaScript: With and Without Duplicates

In this post, you’ll learn how to combine multiple arrays into a single array in JavaScript. This is known as merging arrays. This is a simple problem that has multiple solutions. You will learn the most widely used and optimal ways of merging arrays.

6. Remove Duplicates From an Array in JavaScript

In this post, we’re going to deal with a commonly needed functionality for arrays in JavaScript: how to remove duplicates. There are multiple ways of removing array duplicates, and I’ll show you each in this tutorial.

You’ll learn how to remove duplicates from an array of primitives, and how to remove duplicates from an array of objects the right way. 

7. Iterating Over Arrays in JavaScript: 4 Methods Compared

Iterating over or looping through arrays is something we have to do in almost every project that involves working with arrays. There are many reasons why you might need to loop over an array, such as showing the array data as an output or transforming it.

There are many methods that you can use to iterate over arrays in JavaScript. In this tutorial, we will learn about them all while discussing the advantages or disadvantages of each in detail.

8. Useful Array Methods in the Lodash Library

While there are quite a few useful methods to work with Arrays in JavaScript, they are sometimes not enough to meet all our needs. You can save a lot of time by using a library like Lodash that offers a huge set of methods that implement common functionality missing from native JavaScript methods.

In this tutorial, I will show you some interesting methods defined in Lodash that you can start using right away. All you need to do to get started is load the library in your project from any CDN.

9. Working with 2D Arrays in JavaScript

In this tutorial, you’ll learn how to work with 2D arrays in JavaScript. JavaScript doesn’t have built-in support for 2D arrays. This is not a big issue because arrays in JavaScript can contain other arrays as their elements. This means that we can create 2D arrays in JavaScript by creating an array of arrays.

Let’s review some of the basics such as 2D array initialization and then implement additional functionality like getting and setting element values in a 2D array.


Source link