What is the key difference between the JavaScript string methods replace() and replaceAll()? Support your answer with an example.
Show Hint
Warning! If you pass a regular expression to replaceAll(), it must contain the global (/g) flag. If the global flag is missing, JavaScript will throw a TypeError: replaceAll must be called with a global RegExp.