Dart-programming-list-last-method

提供:Dev Guides
移動先:案内検索

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}");
}

次の output が生成されます-

The last element of the list is: 13