Question: 1. Make all countries in the following array follow the same formatting: // The first letter should be upper case, the rest lower case. Print

1. Make all countries in the following array follow the same formatting: // The first letter should be upper case, the rest lower case. Print the // result to the console.

var countries = ["AustraliA", "greece", "PERU", "ChInA"];

// 2. Get every second and third letter from each country and concatenate them. // Print the results to the console.

// 3. In the sentence below replace 'dart' with 'arrow' by using the indexOf // and slice functions.

var sentence = "Time flies like an dart; fruit flies like a banana.";

// 4. Find the index of the last occurrence of flies in sentence.

// 5. Prompt the user for a string, reverse it, and show the result to the user.

. javascript

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!