Determine if two strings are similar in Javascript?

Spread the love

Question Description

Let’s say I have two strings, is there any way to check if they are at least 90% similar?

var string1 = "theBoardmeetstoday,tomorrow51";
var string2 = "Board meets today, tomorrow";



Practice As Follows

The wikipedia entry for Levenshtein distance includes a sample implementation.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.