Build an Array from Scratch in Javascriptby@vibhorthakral
1,905 reads

Build an Array from Scratch in Javascript

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

In this post, we are going to dig a little deeper into understanding Arrays by building our own array from scratch. Arrays in JavaScript are just Objects with integer-based keys that act as indexes and that’s what we aim to build here. We will start by creating a class called NewArray and as soon as we create the class we want to give it certain information, two in our case: length and the data that needs to be stored in the array. If you want to implement an array in a different language, some things might work differently and you will need to figure out how to get that working.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Build an Array from Scratch in Javascript
Vibhor Thakral HackerNoon profile picture


Vibhor Thakral

Receive Stories from @vibhorthakral

react to story with heart


. . . comments & more!