// objective:
// Convert a binary number into a decimal number

// solution:
const assert = require("assert");

const SimpleMode = arr => {
  return parseInt((arr + "")
    .replace(/[^01]/gi, ""), 2);
};

console.log(SimpleMode("5,5,2,2,1"));
const r1 = "5";
assert(r1);

@@ -105,21 +105,24 @@
 ert%22);%0A%0A
-const
+function
  SimpleM
@@ -128,17 +128,14 @@
 Mode
- = arr =%3E
+(bstr)
  %7B%0A 
@@ -156,22 +156,18 @@
 nt((
-ar
+bst
 r + %22%22)
-%0A    
 .rep
@@ -192,19 +192,21 @@
 ), 2);%0A%7D
-;
 %0A%0A
+// 
 console.
@@ -225,22 +225,19 @@
 de(%22
-5,5,2,2,
+1100
 1%22));%0A
+%0A
 cons

add working test, edit function