last返回数组中最后一项
ZKEASOFT August 28, 2018
last
last
用于返回数组中的最后一项值
输入
{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}
{{ my_array.last }}
输出
plums
输入
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array.last }}
输出
tiger