Understand JavaScript Array Methods By Rebuilding Them From Scratch

Understand JavaScript Array Methods By Rebuilding Them From Scratch

Learn How to Create an Array Class!

In life, one of the best ways to learn is through doing. JavaScript is no exception, as many concepts may seem mystifying until you learn the underlying mechanics. The abstract nature of enumerable methods (map, filter and reduce), object construction, and the prototypical nature of JavaScript objects can confuse novice programmers. Let’s clear up some of that confusion by creating an Array class.

class OurArray {
    constructor() {
        this.items = []
        this.count = this.items.length
        if (arguments.length != 0) this.create_array(arguments)
    }

    create_array(items) {
      for(let x = 0; arguments[0].length > x; x++) {
        this.push(arguments[0][x]) 
      }
    }

    push(element) {
        this.items[this.count] = element
        console.log(`${element} added to ${this.count}`)
        this.count += 1
        return this.count - 1
    }
}

programming javascript

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Object-oriented Programming in JavaScript: Made Super Simple. DO NOT MISS!!!

Object-oriented Programming in JavaScript: Made Super Simple. Learn all about objects, prototypes, prototypical inheritance, this and more.

Learning JavaScript: Development Environments for JavaScript Programming

One of the nice things about learning JavaScript these days is that there is a plethora of choices for writing and running JavaScript code. In this article, I’m going to describe a few of these environments and show you the environment I’ll be using in this series of articles.

Learn JavaScript - Full Course for Beginners. DO NOT MISS!!!

In this video tutorial, we'll learn Learn JavaScript - Full Course for Beginners. This complete 134-part JavaScript tutorial for beginners will teach you everything you need to know to get started with the JavaScript programming language. DO NOT MISS!!!

Learning JavaScript: Data Types and Variables

To paraphrase the title of an old computer science textbook, “Algorithms + Data = Programs.” The first step in learning a programming language such as JavaScript is to learn what types of data the language can work with. The second step is to learn how to store that data in variables. In this article I’ll discuss the different types of data you can work with in a JavaScript program and how to create and use variables to store and manipulate that data.

[ Professor JavaScript ]: Introduction

Professor JavaScript is a JavaScript online learning courses YouTube Channel. Students can learn how to develop codes with JavaScript from basic to advanced levels through the online courses in this YouTube channel.