Question: Compulsory Task 2 Follow these steps: Open up separation.js. This program uses a set of test strings and calls a method separationString on each string.

Compulsory Task 2

Follow these steps:

Open up separation.js. This program uses a set of test strings and calls a method separationString on each string.

This method should take a string as input, and output a new string with each word on a new line.

Fill in the code for separationString. Do not modify any other aspect of the script.

Compulsory Task 3

Follow these steps:

Open up disappear.js. This program uses a set of test strings and calls a method disappearString on each string.

This method should take as input two strings: myString and toErase. It will look at each letter in toErase, and remove the first instance of that letter from myString.

For example: the quick brown fox jumps over the lazy dog. After stripping a,e,i,o,u becomes: th qck brwn fox jumps over the lzy dog.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!