Program to access first and last item in array:
First element is 3 Last element is 5
First element is Geeks Last element is science
- How to Get First and Last Element of Slice in Golang?
- Last-child and last-of-type selector in SASS
- How to delete an item or object from the array using ng-click ?
- How to make the cursor to hand when a user hovers over a list item using CSS?
- How to remove indentation from an unordered list item using CSS?
- How to make whole area of a list item in navigation bar is clickable using CSS ?
- How to change the list item bg-color individually using ngFor in Angular 2+ ?
- Program to Insert new item in array on any position in PHP
- PHP program to add item at the beginning of associative array
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.