Implement arrayEndOperations() with no parameters. Start with the array [10, 20, 30], push the value 40 onto the end, then pop the last element off, and return the resulting array.
Input
(no parameters)
Output
The array after performing the push and pop operations.
Examples
Example 1
Input(no arguments)
Output[10, 20, 30]
Explanation: Pushing 40 yields [10, 20, 30, 40]; popping removes the last element, leaving [10, 20, 30].
Constraints
Use end-of-array push and pop only (no shifting from the front).