Question: what is the difference between .match and .test in javascript?
Answer: match() is a method on a string and takes a regex object as an argument. . test() returns a boolean if there's a match or not. ... exec() is called on the regex and can be called multiple times to return multiple complex matches (when you need multiple matches with groups).