Which of the following statements is true?
A.The replace() method replaces all occurrences of one character in the invoking string with another character.
B. The replace() function replaces only the initial occurrences of a character in an invoking string with another character.
C. The replace() method replaces all of the characters in the invoking string with another character.
D.replace() The replace() method replaces the last occurrence of a character in the invoking string with another character.
Answer:A
Which of the following statements is true?
A.The replace() method replaces all occurrences of one character in the invoking string with another character. B. The replace() function replaces only the initial occurrences of a character in an invoking string with another character. C. The replace() method replaces all of the characters in the invoking string with another character. D.replace() The replace() method replaces the last occurrence of a character in the invoking string with another character.
Explanation: The replace() method replaces all instances of one character in the invoking string with another one.