Match the word

Report a typo

In the code below, there is a function called matchTheWord that takes a word string as an argument. Create a regex to match this word if it contains the pattern tion.

You don't need to call the function; just return the result.

Sample Input 1:

prediction

Sample Output 1:

true
Write a program in JavaScript
function matchTheWord(word) {

}
___

Create a free account to access the full topic