head function
- List array
Finds the first element in the array
Uses dart's List.first
property
Example
_.head(["Dart", "Javascript", "Swift"]);
// Returns "Dart"
Implementation
dynamic head(List array) {
return array.first;
}
Finds the first element in the array
Uses dart's List.first
property
Example
_.head(["Dart", "Javascript", "Swift"]);
// Returns "Dart"
dynamic head(List array) {
return array.first;
}