Question: Write JavaScript program that will ask user for a string and for an index. The program should then display the character in the given string

Write JavaScript program that will ask user for a string and for an index. The program should then display the character in the given string at the given index.

2. Write JavaScript program that will ask user for a string and two (different) indices. The program should create and display new string in which the characters in the original string at two indices are switched.

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!