We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d2df82 commit 2b8ce8dCopy full SHA for 2b8ce8d
snippets_archive/levenshteinDistance.md
@@ -5,7 +5,7 @@ Calculates the [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_
5
Calculates the number of changes (substitutions, deletions or additions) required to convert `string1` to `string2`.
6
Can also be used to compare two strings as shown in the second example.
7
8
-``` js
+```js
9
const levenshteinDistance = (string1, string2) => {
10
if (string1.length === 0) return string2.length;
11
if (string2.length === 0) return string1.length;
0 commit comments