font(), back() – first and last element in array

In this code example the first and the last element of the array are determined.

#include <iostream>
#include <array>
using namespace std;

int main() {
    array<int, 9> myArray[] = {1, 2, 3, 4, 5, 6, 7, 8, 9};

    cout << myArray->front() << endl;
    cout << myArray->back() << endl;

    return 0;
}
Output
first element in array: 1
last element in array: 9