From 76fdc9341bc7c80c2239a2eb48daf209cc79b4eb Mon Sep 17 00:00:00 2001 From: Lidenbrock-ed Date: Mon, 24 May 2021 17:57:55 -0500 Subject: [PATCH] Solved challenge --- src/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 243d154..8eeffdd 100644 --- a/src/index.js +++ b/src/index.js @@ -5,7 +5,16 @@ */ const hammingDistance = (a, b) => { - + let hamming = 0; + if(a.length != b.length){ + throw Error; + } + for(let letter = 0; letter