Javascript String Help needed


First time on this forum, hope someone can help :slight_smile:

My question is as follows:

I have n number of strings


I need to find a way to compare n number of strings and extract the common string value from the start of the strings.

So, using the above strings my returned value must be AZA

Will the beginning of each string always have the same number of characters in common?

Not sure what you mean, sorry. Each string can be off different lengths.

In common… per your example, you wanted to get all strings that had “AZA” at the beginning in common… will it always be three characters? Or varying?

always be varying :slight_smile: