images to svg
This commit is contained in:
parent
a31e881856
commit
3ba28aa104
734 changed files with 11682 additions and 245 deletions
|
@ -373,7 +373,7 @@ The code is short and easy to understand (hopefully?). That's the power of recur
|
|||
|
||||
Here's the diagram of calls:
|
||||
|
||||

|
||||

|
||||
|
||||
We can easily see the principle: for an object `{...}` subcalls are made, while arrays `[...]` are the "leaves" of the recursion tree, they give immediate result.
|
||||
|
||||
|
@ -444,7 +444,7 @@ let list = {
|
|||
|
||||
Graphical representation of the list:
|
||||
|
||||

|
||||

|
||||
|
||||
An alternative code for creation:
|
||||
|
||||
|
@ -464,7 +464,7 @@ let secondList = list.next.next;
|
|||
list.next.next = null;
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
To join:
|
||||
|
||||
|
@ -488,7 +488,7 @@ list = { value: "new item", next: list };
|
|||
*/!*
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
To remove a value from the middle, change `next` of the previous one:
|
||||
|
||||
|
@ -496,7 +496,7 @@ To remove a value from the middle, change `next` of the previous one:
|
|||
list.next = list.next.next;
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
We made `list.next` jump over `1` to value `2`. The value `1` is now excluded from the chain. If it's not stored anywhere else, it will be automatically removed from the memory.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue