140k views
0 votes
Find the index of the string "noisy" and assign substringIndex with the index. Then, update wiseProverb replacing "noisy" with "squeaky".

1 Answer

5 votes

Answer is given below

Step-by-step explanation:

the index of the string "noisy"

and

substringIndex with the index is express as here given below

when we update with replace wiseProverb as "noisy" with "squeaky"

than

var wiseProverb = "The noisy wheel gets the grease.";

var substringIndex = 0;

substringIndex = wiseProverb.indexOf("noisy");

wiseProverb.replace("noisy", "squeaky");

User Eendje
by
6.9k points