Question: I am working on the below demo. How can I add an event listener and handler to a `#checker` button to check the checkbox with the value of `Benz` using core JavaScript?

```js
function checkBenz(){

}

var el = document.getElementById("checker");
el.addEventListener("click", checkBenz);
```

```html
<button id="checker">Check Benz</button> <br />
<input type="checkbox" name="cars" value="Benz"> Benz <br />
<input type="checkbox" name="cars" value="BMW"> BMW <br />
```

Answer: 
If I understood you correctly - it should help you.

```
<button id="checker">Check Benz</button> <br />
<input type="checkbox" name="cars" value="Benz"> Benz <br />
<input type="checkbox" name="cars" value="BMW"> BMW <br />
<script>
    function checkBenz(){
        document.querySelector("input[value=Benz]").setAttribute('checked','checked');
    }

    var el = document.getElementById("checker");
    el.addEventListener("click", checkBenz);
</script>

```
I hope this helps 

```js
function checkBenz(){
    document.querySelector(`input[value="Benz"]`).setAttribute("checked", "true");
}

var el = document.getElementById("checker");
el.addEventListener("click", checkBenz);
```

```html
<button id="checker">Check Benz</button> <br />
<input type="checkbox" name="cars" value="Benz"> Benz <br />
<input type="checkbox" name="cars" value="BMW"> BMW <br />
```