Q:

How can I make a JS if statement to see if a value isn't certain strings?

Why does this JS not work? The goal is to enter something into the text box that isn't help, windows-xp, explicit, default, or nothing, press enter, and have that alert "Command doesn't exist". 

function checkInput() {
  var commandInput = document.getElementById("command-input")

  if (commandInput.value !== "help", "windows-xp", "explicit", "default", "") {
    alert("Command doesn't exist.");
  }

  event.preventDefault();

  document.getElementById("command-form").reset();
}
<form id="command-form">
  <input type="text" placeholder="Enter Command" id="command-input">
  <input type="submit" onclick="checkInput();" style="display: none;">
</form>

A:

Use Array.includes:
const validCommands = ["help", "windows-xp", "explicit", "default", ""];

if (!validCommands.includes(commandInput.value)) {
  alert("Command doesn't exist.");
}

