Added 4th task, added pseudo code to JS for task 1.