You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Source code of **Learning JavaScript Data Structures and Algorithms** book, third edition.
8
+
9
+
Work in Progress.
10
+
11
+
## List of available chapters:
12
+
13
+
* 01: [JavaScript, ECMAScript and TypeScript: a quick overview](https://github.com/loiane/javascript-datastructures-algorithms/tree/third-edition/examples/chapter01)
* Creation of a Data Structures and Algorithms library that can be used in the browser or with Node.js
36
+
* Algorithms tested with Mocha + Chai (test code available in `test` directory)
37
+
***TypeScript** version of the source code included (library and tests)
38
+
39
+
## Project Structure
40
+
41
+
`src/js/index.js` file contains all the data structures and algorithms listed by chapter.
42
+
43
+
```
44
+
|_examples (how to use each data structure and algorithm, organized by chapter)
45
+
|_src
46
+
|___js (source code: JavaScript version)
47
+
|_____data-structures
48
+
|_______models (classes used by DS: Node, ValuePair, ...)
49
+
|_____others (other algorithms such as palindome checker, hanoi tower)
50
+
|___ts (source code: TypeScript version)
51
+
|_____data-structures
52
+
|_______models
53
+
|_____others
54
+
|_test (unit tests with Mocha and Chai for src)
55
+
|___js (tests for JavaScript code)
56
+
|___ts (tests for TypeScript code)
57
+
```
58
+
59
+
## Installing and running the book examples With Node
60
+
61
+
* Install [Node](https://nodejs.org)
62
+
* Open terminal/cmd and change directoty to this project folder: `cd /Users/.../javascript-datastructures-algorithms` (Linux/Max) or `cd C:/.../javascript-datastructures-algorithms`
63
+
* run `npm install` to install all depencies
64
+
* To see the examples, run `http-server html` or `npm run serve`. Open your browser `http:\\localhost:8080` to see the book examples
65
+
* Or `cd html/chapter01` and run each javascript file with node: `node 02-Variables`
66
+
67
+
## Running the examples in the browser
68
+
69
+
* Right click on the html file you would like to see the examples, right click and 'Open with Chrome (or any other browser)'
70
+
71
+
* Or open the `examples/index.html` file to easily nagivate through all examples:
0 commit comments