JavaScript .replaceAll() is not a function type error

created at 08-23-2021 views: 1

solution

Check the browser version used, the browser version is lower.

type this address in chrome 

chrome://version

According to the MDN documentation, it is found that replaceAll() is only available in chrome version 85. Upgrade the browser version or change to the replace method (use /g for global replacement).

Please log in to leave a comment.