Question: Javascript #1 part 1 Use a loop to Loop through the characters in the string wiseSaying and assign numAppearances with the number of times 'o'

Javascript

#1 part 1

Use a loop to Loop through the characters in the string wiseSaying and assign numAppearances with the number of times 'o' appears in the string.

var wiseSaying = "When in Rome do as Romans do."; // Code will be tested with "You can lead a horse to water, but you can't make him drink. If you want something done right, you have to do it yourself." var numAppearances = 0;

/* Your solution goes here */

-------------------------------------------------------------------------------------

#1 part 2

Concatenate firstString with secondString and store the result in the userDate variable. Concatenate secondString with firstNumber and store the result in numberResult.

some given code below-

var firstString = 'May '; // Code tested with values: 'May ' and 'November ' var secondString = '4'; // Code tested with values: '4' and '27' var firstNumber = 7; // Code tested with values: 7 and 2

var userDate = ''; var numberResult = 0;

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!