📄️ exec()
exec() executes a search for a regular expression pattern in its string argument.
📄️ test()
test() tests its string argument for an occurrence of a regular expression.
Learn about the RegExp methods in JavaScript
exec() executes a search for a regular expression pattern in its string argument.
test() tests its string argument for an occurrence of a regular expression.