Create a function named displayTotalCount
with two parameters:
- An array of strings.
- A new string element to be added to the list.
The displayTotalCount function should execute
the following tasks:
- Adds the string to the array.
- Display the total count of elements in the
updated array by logging it to the console.
Create a function removeLastMember
that takes an array of strings as a parameter.
The removeLastMember
function should
perform the following steps:
- Removes the last element from the array.
- Display the updated array by logging
it to the console.
Create a new function named calculateTotal
that accepts two arrays as parameters
and logs to the console, the total number
of elements in both arrays.