aboutsummaryrefslogtreecommitdiff
path: root/doc/docs
diff options
context:
space:
mode:
Diffstat (limited to 'doc/docs')
-rwxr-xr-xdoc/docs/doc/README.md8
-rwxr-xr-xdoc/docs/zh/doc/README.md8
2 files changed, 8 insertions, 8 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}
591You can use the **#** operator to get the last elements of a table. 591You can use the **#** operator to get the last elements of a table.
592 592
593```moonscript 593```moonscript
594print data.items[#] -- get the last element of a table 594last = data.items[#]
595print data.items[#-1] -- get the second last element of a table 595second_last = data.items[#-1]
596``` 596```
597<YueDisplay> 597<YueDisplay>
598<pre> 598<pre>
599print data.items[#] -- get the last element of a table 599last = data.items[#]
600print data.items[#-1] -- get the second last element of a table 600second_last = data.items[#-1]
601</pre> 601</pre>
602</YueDisplay> 602</YueDisplay>
603 603
diff --git a/doc/docs/zh/doc/README.md b/doc/docs/zh/doc/README.md
index 7ff205c..9669231 100755
--- a/doc/docs/zh/doc/README.md
+++ b/doc/docs/zh/doc/README.md
@@ -590,13 +590,13 @@ merge = {...a, ...b}
590你可以使用 **#** 操作符来反向索引表中的元素。 590你可以使用 **#** 操作符来反向索引表中的元素。
591 591
592```moonscript 592```moonscript
593print data.items[#] -- 获取表的最后一个元素 593last = data.items[#]
594print data.items[#-1] -- 获取表的倒数第二个元素 594second_last = data.items[#-1]
595``` 595```
596<YueDisplay> 596<YueDisplay>
597<pre> 597<pre>
598print data.items[#] -- 获取表的最后一个元素 598last = data.items[#]
599print data.items[#-1] -- 获取表的倒数第二个元素 599second_last = data.items[#-1]
600</pre> 600</pre>
601</YueDisplay> 601</YueDisplay>
602 602