I'm trying to make a beginner program that returns true if an inputted string ends with a vowel and false if not, but am having issues given endsWith() only allows to do one letter at a time. messing around with if else options today didn't help me much and after a couple hours on one problem i'm ready for some help lol
here's what i have so far:
console.log(x.endsWith("e"));
console.log(x.endsWith("i"));
console.log(x.endsWith("o"));
console.log(x.endsWith("u"));```
any help is appreciated thanks so much. we're supposed to have just one boolean value show up and I'm stumped
Another possible solution -