Skip to content
Advertisement

How to check if at least three letters from both variables match

JavaScript

Using JavaScript, how do I check if at least three letters from both variables match?

Advertisement

Answer

If you mean that you want to determine if a contiguous sequence of at least n (bytes of) characters match in two strings, you could do it like this (sliding window Google query):

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement