What happens when this runs?
'aaa'.replaceAll(/a/, 'b')
- TypeError
- SyntaxError
- 'bbb'
- 'baa'
replaceAll requires a regex with the g flag and throws a TypeError otherwise.'aaa'.replaceAll(/a/, 'b')
replaceAll requires a regex with the g flag and throws a TypeError otherwise.