I'd like to make an if statement like this:
if(playerMessage == specificallyOnlyTwoWords) {
// do something
}
This means, when for example, "playerMessage" has a value of "Fruit Ninja" it'll will do the code in the if statement, but if the value of the variable is "Great Fruit Ninja" the code in the if statement wont be run.
Two words is a word divided by a blank space or
If possible, if it could pay attention punctuation would be greatly appreciated. "Punctuation" is any character that is not a letter. So for example: A
is a letter, ;
is punctuation
I'm using JavaScript.