How to find out which event listener has fired

I have a bunch of input fields with event listeners attached using a for loop and class names. Is there a way I can get the id of the input field that fired? I’ve got about 40 input fields and I want to take the id from the input that triggered and pass it into the function as the variable.

HTML -

<input type="text" id="t11Text1" class="text1 input">
<input type="text2" id="t11Text2" class="text2 input">
<input type="text" id="t12Text1" class="text1 input">
<input type="text2" id="t12Text2" class="text2 input">

JS -

var onChange = document.querySelectorAll('.input');
var onChangeSelect = document.querySelectorAll('.select');
for (var i = 0; i < onChange.length; i++) {
  onChange[i].addEventListener("input", function() {
    myFunction();
  });
}

solution

You can access the event object within the anonymous function, and event.target.id will be the id of the element.

var onChange = document.querySelectorAll('.input');
var onChangeSelect = document.querySelectorAll('.select');
for (var i=0; i < onChange.length; i++){
  onChange[i].addEventListener("input", function (event) {
   // event.target.id
   myFunction();
  });