Question: Java Script Write a program that requests the user to input a word, then prints out the first two letters - then skips a letter

Java Script

Write a program that requests the user to input a word, then prints out the first two letters - then skips a letter - then prints out the next two consecutive letters - then skips a letter - then this process repeats through the rest of the word.

Hint #1 - You will need to use the substring method inside a loop in order to determine which letters of the String should be printed.

Hint #2 - You can use the length method on the String to work out when this loop should end.

Sample run #1:

Input a word: calculator cacuatr 

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!