Getting All Elements In An Array (Javascript)

You got it the other way around. You have to use .includes on the data array to check if the array includes the word you are looking for.

const fruits = ["apple", "banana", "orange"]
console.log(fruits.includes("banana"))
console.log(fruits.includes("something not in the array"))

I would use an intersection here. Just in case you don't know what that is ...

An intersection is the elements that two arrays share in common.

For example

swearWords = ["f***", "s***"];
messageWords = ["I", "am", "angry...", "f***", "and", "s***"];
let intersection = messageWords.filter(x => swearWords.includes(x));
console.log(intersection) //-> ["f***", "s***"]

Your usage of includes is wrong.

From MDN:

The includes() method determines whether an array includes a certain value among its entries, returning true or false as appropriate.

arr.includes(valueToFind[, fromIndex])

const fruits = ["apple", "banana", "orange"];
const swearWord = "orange";

// execute is available
if (fruits.includes(swearWord))
  console.log("Swear word exists.");
else 
  console.log("Swear word doesn't exist.");

To check the otherway, if string contains the array's swearword:

const fruits = ["apple", "banana", "orange"];
const swearWord = "this contains a swear word. orange is the swear word";

// execute is available
if (checkForSwearWord())
  console.log("Swear word exists.");
else
  console.log("Swear word doesn't exist.");

function checkForSwearWord() {
  for (const fruit of fruits) 
    if (swearWord.includes(fruit)) return true;
  return false;
}