I want to detect if a user types one of the strings of my list and then output in what string the user typed in the console.
HTML
<input id="input"></input>
JS
window.onload = function(){
var input = document.getElementById('formula');
var strings = ["string1", "string2", "string3", "string4"]
formula.onkeypress = function (e) {
if (input.value.includes(strings)) {
console.log("Input contains a the string:" + string???)
}
};
}