Dart Iterable elementAt()

Dart Iterable elementAt()

·

1 min read

elementAt():

  • Returns the index the element.

  • The index must be non-negative and less than length.index zero represents the first element.

Example:

void main() {
  List<int> name = [1, 2, 3, 4, 5, 6];
  int element = name.elementAt(5);
  print('jeet : ${element}');
}
jeet : 6

Exited.