Which of the following replaces the two characters located in subscripts 4 and 5 in a string

Question:

Which of the following replaces the two characters located in subscripts 4 and 5 in a string variable named code with the string “AB”? 

a. code.replace(2, 4, "AB"); 

b. code.replace(4, 2, "AB"); 

c. code.replace(4, 5, "AB"); 

d. replace(code, 4, "AB");

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: