Data Structures in JS: Linked Lists
Tags: javascript
Published: 2020-12-26 06:25:16

---
title: Data Structures in JS: Linked Lists
published: true
date: 2020-04-05 07:13:00 UTC
tags: JavaScript
canonical_url: https://drmsite.blogspot.com/2020/04/data-structures-in-js-linked-lists.html
---

[![](https://2.bp.blogspot.com/-yZfRA3hgsa4/XomFH7ZGqzI/AAAAAAAAlxU/srKaZPpoaZwW6V_UXOHonfcWM8tocr1XwCLcBGAsYHQ/s400/vacant_white_chairs-scopio-f9f93eba-8f91-4581-b2f2-9a7382b19b6c.jpg)](https://2.bp.blogspot.com/-yZfRA3hgsa4/XomFH7ZGqzI/AAAAAAAAlxU/srKaZPpoaZwW6V_UXOHonfcWM8tocr1XwCLcBGAsYHQ/s1600/vacant_white_chairs-scopio-f9f93eba-8f91-4581-b2f2-9a7382b19b6c.jpg)

I'm terrible for buying books and courses and never reading or watching them, so I decided to revisit one I bought not so long ago called Learning Data Structures in JavaScript from Scratch. The chap teaching it (Eric Traub) uses [repl.it](https://repl.it/), but I decided to use JSFiddle. Here is the code from the first section, on Linked Lists:

- [Constructor Functions and the "this" Keyword](https://subscription.packtpub.com/video/programming/9781800206878/p1/video1_2/-constructor-functions-and-the-this-keyword) [https://jsfiddle.net/annoyingmouse/vg12arpf/](https://jsfiddle.net/annoyingmouse/vg12arpf/)
- [The Prototype Object](https://subscription.packtpub.com/video/programming/9781800206878/p1/video1_3/-the-prototype-object) [https://jsfiddle.net/annoyingmouse/1nL6o934/](https://jsfiddle.net/annoyingmouse/1nL6o934/)
- [Linked List and "Node" Constructor Functions](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_2/-linked-list-and-node-constructor-functions) [https://jsfiddle.net/annoyingmouse/4bhLtr23/](https://jsfiddle.net/annoyingmouse/4bhLtr23/)
- [Add To Head - part 1](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_3/-add-to-head-part-1) [https://jsfiddle.net/annoyingmouse/c6gnft1r/](https://jsfiddle.net/annoyingmouse/c6gnft1r/)
- [Add To Head - part 2](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_4/-add-to-head-part-2) [https://jsfiddle.net/annoyingmouse/uthwm1nL/](https://jsfiddle.net/annoyingmouse/uthwm1nL/)
- [Using Add To Head](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_5/-using-add-to-head) [https://jsfiddle.net/annoyingmouse/gd1yo7p0/](https://jsfiddle.net/annoyingmouse/gd1yo7p0/)
- [Add To Tail](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_6/-add-to-tail) [https://jsfiddle.net/annoyingmouse/gpqschf0/](https://jsfiddle.net/annoyingmouse/gpqschf0/)
- [Testing Add To Tail and Add To Head](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_7/-testing-add-to-tail-and-add-to-head) [https://jsfiddle.net/annoyingmouse/8h9gb26q/](https://jsfiddle.net/annoyingmouse/8h9gb26q/)
- [Remove Head](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_8/-remove-head) [https://jsfiddle.net/annoyingmouse/f9upvoyd/](https://jsfiddle.net/annoyingmouse/f9upvoyd/)
- [Remove Tail](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_9/-remove-tail) [https://jsfiddle.net/annoyingmouse/hLb7y81w/](https://jsfiddle.net/annoyingmouse/hLb7y81w/)
- [Search Method](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_10/-search-method) [https://jsfiddle.net/annoyingmouse/pbm6huf5/](https://jsfiddle.net/annoyingmouse/pbm6huf5/)
- [Testing Search](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_11/-testing-search) [https://jsfiddle.net/annoyingmouse/ob1c946w/](https://jsfiddle.net/annoyingmouse/ob1c946w/)
- [Linked List - Exercise Review](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_13/-linked-list-exercise-review) [https://jsfiddle.net/annoyingmouse/v501emho/](https://jsfiddle.net/annoyingmouse/v501emho/)
- [Big O Notation and Calculating the Runtime of a Function](https://subscription.packtpub.com/video/programming/9781800206878/p2/video2_14/-big-o-notation-and-calculating-the-runtime-of-a-function) [https://jsfiddle.net/annoyingmouse/fbh94cd6/](https://jsfiddle.net/annoyingmouse/fbh94cd6/)

On the whole, Eric Traub is an engaging tutor, and I learnt a load - well worth a [watch](https://www.packtpub.com/gb/programming/learning-data-structures-in-javascript-from-scratch-video). He sometimes speaks a little slowly, but I think that's deliberate, so I watched at 1.25 speed.