I am trying to find the value of an input by className using pure JavaScript. When I run similar code for and ID it works, but when I try with a class name it returns undefined. I am able to do this with jQuery but I want to achieve it with pure JavaScript to have a better understanding of the language. Thank you!

**JAVASCRIPT**

```
var input1 = document.getElementsByClassName("blank1");
var submit = document.getElementsByClassName("submit");

correctAnswer = 'hello';

submit[0].addEventListener('click', checkFillIn);

function checkFillIn(){
    if ( input1[0].value === correctAnswer ){
        console.log('correct!');
    }else{
        console.log('incorrect');
    }
}

```

**HTML**

```
<p><input id="blank1" value="" type="text"></input></p>
<a href="#" class="submit">Submit</a>

```