diff options
Diffstat (limited to 'doc/docs/doc/README.md')
-rwxr-xr-x | doc/docs/doc/README.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/docs/doc/README.md b/doc/docs/doc/README.md index a607036..a474131 100755 --- a/doc/docs/doc/README.md +++ b/doc/docs/doc/README.md | |||
@@ -591,13 +591,13 @@ merge = {...a, ...b} | |||
591 | You can use the **#** operator to get the last elements of a table. | 591 | You can use the **#** operator to get the last elements of a table. |
592 | 592 | ||
593 | ```moonscript | 593 | ```moonscript |
594 | print data.items[#] -- get the last element of a table | 594 | last = data.items[#] |
595 | print data.items[#-1] -- get the second last element of a table | 595 | second_last = data.items[#-1] |
596 | ``` | 596 | ``` |
597 | <YueDisplay> | 597 | <YueDisplay> |
598 | <pre> | 598 | <pre> |
599 | print data.items[#] -- get the last element of a table | 599 | last = data.items[#] |
600 | print data.items[#-1] -- get the second last element of a table | 600 | second_last = data.items[#-1] |
601 | </pre> | 601 | </pre> |
602 | </YueDisplay> | 602 | </YueDisplay> |
603 | 603 | ||