I have a group of lines that look like this:
var uglystrings = ["ChipBagYAHSC","BlueToothNSJ"]
All of them have 2-5 capital letters at the end. I would like to remove capital letters from the end using js, but I'm not sure what is the most efficient way? I can't do substr
it because everyone at the end will have a few capital letters
source
share