String.prototype.replaceAll

GPTKB entity

Statements (25)
Predicate Object
gptkbp:instanceOf JavaScript method
gptkbp:affiliatedWith gptkb:String.prototype
gptkbp:definedIn gptkb:ECMAScript_2021
gptkbp:describes Returns a new string with all matches of a pattern replaced by a replacement.
gptkbp:example 'abcabc'.replaceAll(/a/g, 'x') // 'xbcxbc'
'foo bar foo'.replaceAll('foo', 'baz') // 'baz bar baz'
https://www.w3.org/2000/01/rdf-schema#label String.prototype.replaceAll
gptkbp:introducedIn ES12
gptkbp:isConfigurable true
gptkbp:isEnumerable false
gptkbp:isMutable false
gptkbp:isWritable true
gptkbp:parameter replaceValue
searchValue
gptkbp:polyfillable true
gptkbp:replaceValueType gptkb:software
string
gptkbp:result string
gptkbp:searchValueType gptkb:RegExp
string
gptkbp:staticMethod false
gptkbp:throws TypeError if searchValue is a RegExp without global flag
gptkbp:bfsParent gptkb:ES2021
gptkb:ECMAScript_2021
gptkbp:bfsLayer 6