This is the code repository for Learning JavaScript Data Structures and Algorithms - Third Edition, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.
JavaScript is one of the most popular programming language nowadays. It is known as the internet language due the fact that the browser understands JavaScript natively, without installing any plugins in it. JavaScript has grown so much that is no longer just a frontend language; it is also present now on the server (NodeJS), database (MongoDB), and mobile devices and is also used in embedded and Internet of Things (IoT) devices.
Learning data structures is very important for any technology professional. Working as a developer means you are able to solve problems with the help of programming languages, and data structures are an indispensable piece of the solutions we need to create to solve these problems. Choosing a wrong data structure can also have an impact on the performance of the program we are writing. That is why, it's important to get to know different data structures and how to apply them properly.
Algorithms are the state of art of computer science. There are so many ways of solving the same problem, and some approaches are better than the others. That is why, it's also very important to know the most famous algorithms. This book was written for beginners who want to learn data structures and algorithms and also for those who are already familiar with data structures and algorithms, but want to learn it using JavaScript.
Happy coding!
All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter02.
The code will look like the following:
class Stack {
constructor() {
this.items = []; // {1}
}
}
Although this book provides a brief introduction on JavaScript in its first chapter, you will need a basic knowledge of JavaScript and programming logic.
To test the code examples provided by this book, you will need a code editor (such as Atom or Visual Studio Code) so that you can read the code and also a browser (Chrome, Firefox, or Edge).
Also, remember to open the developer tools of the browser so that you can see what is being outputted in the browser's console.