Question: I want to find if the userinput has 6 characters and if it has a space in position 4 or i guess 5 if it stars counting from zero. Im new to java script and think I'm over thinking it please help!

Answer: 
However your question is not much clear to me at 'or i guess 5 if it starts counting from zero' but as much as I understood from your question the answer is as follow:

```
// get the user input through it id or whatever 
// CSS selector you are using
var userInput = document.querySelector('#user_input');

// on whatever event you are doing this check
// insert the following code to its handler
if (userInput.value.length === 6 && userInput.value[3] === " ") {
  // your check is true here and do whatever you want
  // return false
}

```
Something like this will work. I used "regular expressions" to test for your requirements.

```
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Test for pattern</title>
<script>

function testInput(){
   // get text input element
   var inputBox = document.getElementById("txtInput");
   var backgroundColor = "red";
   //check if the inputted text matches the regex.
   if(inputBox.value.match(/^\w{3}\s\w{2}$/g)){
       backgroundColor = "green";
       //.. or add whatever has to be done ...
   }
   inputBox.style.backgroundColor = backgroundColor;
}

</script>
</head>
<body>
    <input id="txtInput" type="text" onkeyup="testInput()">
</body>
</html>

```

Working example : [jsFiddle](https://jsfiddle.net/StevenLangeraert/q7t4e72L/1/)