Dart列表-Dart List.last方法

返回列表中的最后一个元素。

语法

List.last

void main() {
var lst = new List();
lst.add(12);
lst.add(13);
print("The last element of the list is: ${lst.last}");
}

它将产生以下 输出

The last element of the list is: 13
以上是Dart列表-Dart List.last方法的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>