I have input field in html and I don't want the user to enter letters. I'm doing this with include method but it's not working. Here's my code:
var priceError = priceInp.value;
var abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "K", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
priceInp.addEventListener("change", function () {
priceError = priceInp.value;
});
if (saveButton) {
saveButton.addEventListener("click", function () {
if (priceError.includes(abc)) {
console.log("No");
}
});