Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started