Answer:
Answer is in the attached screenshot.
Explanation:
Using regex to split a given input string via whitespace, then returns the first and last element of the array.
Answer:
This is done for the simple reason of having more space to work on
Explanation:
This is done for the simple reason of having more space to work on. By clearing the command window and workspace you provide yourself with sufficient space to create new commands without the clutter of the previous commands. This also prevents your focus from shifting towards old commands and allows you to simply focus on the commands you are currently working on. This does not clear all variables from the script, it only clears the current screen but the previous commands can still be accessed by using the up-arrow key