The abstract operation StringIndexOf performs the following steps:
If searchValue is empty and fromIndex is less than or equal to the length of string, this algorithm returns fromIndex. An empty searchValue is effectively found at every position within a string, including after the last code unit.
replaceAll method is called with arguments searchValue and replaceValue, the following steps are taken:
Performs a regular expression match of the String representing the
matchAll method is called, the following steps are taken:
matchAllfunction is intentionally generic, it does not require that its
String.prototype.matchAllis designed to typically act without mutating its inputs.
If searchString appears as a substring of the result of converting this object to a String, at one or more indices that are greater than or equal to position, then the smallest such index is returned; otherwise, -1 is returned. If position is
indexOf method takes two arguments, searchString and position, and performs the following steps:
indexOf function is intentionally generic; it does not require that its