const x = "beta version"; assert(x.endsWithAmong(["version", ""])); assert(x.endsWithAmong(['n', ' '])); assert(x.endsWithAmong("n ")); assert(!x.endsWithAmong(["_"])); assert(!x.endsWithAmong(['_']));
See Implementation