Skip to content

Commit c362dc2

Browse files
committed
Updated docs. [skip CI]
1 parent d127557 commit c362dc2

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

doc/docs/doc/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,13 +591,13 @@ merge = {...a, ...b}
591591
You can use the **#** operator to get the last elements of a table.
592592

593593
```moonscript
594-
print data.items[#] -- get the last element of a table
595-
print data.items[#-1] -- get the second last element of a table
594+
last = data.items[#]
595+
second_last = data.items[#-1]
596596
```
597597
<YueDisplay>
598598
<pre>
599-
print data.items[#] -- get the last element of a table
600-
print data.items[#-1] -- get the second last element of a table
599+
last = data.items[#]
600+
second_last = data.items[#-1]
601601
</pre>
602602
</YueDisplay>
603603

doc/docs/zh/doc/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,13 +590,13 @@ merge = {...a, ...b}
590590
你可以使用 **#** 操作符来反向索引表中的元素。
591591

592592
```moonscript
593-
print data.items[#] -- 获取表的最后一个元素
594-
print data.items[#-1] -- 获取表的倒数第二个元素
593+
last = data.items[#]
594+
second_last = data.items[#-1]
595595
```
596596
<YueDisplay>
597597
<pre>
598-
print data.items[#] -- 获取表的最后一个元素
599-
print data.items[#-1] -- 获取表的倒数第二个元素
598+
last = data.items[#]
599+
second_last = data.items[#-1]
600600
</pre>
601601
</YueDisplay>
602602

0 commit comments

Comments
 (0)