B
B
be_a_man2020-04-15 14:23:46
JavaScript
be_a_man, 2020-04-15 14:23:46

JS string comparison?

const str1 = 'Регулярные выражения'
const str2 = 'Регулярные выржения'


The letter a is missing in the second constant. You need to compare 2 strings if they differ by 1.2 characters true more than false

UPD: ready-made algorithms

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2020-04-15
@be_a_man

https://ru.wikipedia.org/wiki/Levenshtein_distance

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question