Purpose of the exercise is to learn how to use javascript


Using the attached file as a starting point, write JavaScript code to attempt the following tasks:

1. Delete the second paragraph.

2. Swap paragraphs 1 and 3

3. Replace the text of the first paragraph with: "This is the new text"

4. Add a duplicate of the second paragraph to the DOM after the third paragraph

5. Add a duplicate of the second paragraph to the DOM before the third paragraph

You must do these tasks by manipulating the DOM elements, not just changing the text so it looks right.

The purpose of the exercise is to learn how to use javascript, and so you are NOT to add any "class" or "id" attributes to the markup, all functionality must be performed through contextual searches.

You should create a new file for each of the exercises, and add your code to the do_exercise() function. This means you will submit 5 html files inside of 1 zip file.

You must write "vanilla" javascript to do these exercises, you MUST NOT use an external framework like jQuery.

This task will be used in Tutorial set C.

Attachment:- start.rar

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Purpose of the exercise is to learn how to use javascript
Reference No:- TGS02247371

Now Priced at $45 (50% Discount)

Recommended (99%)

Rated (4.3/5)