module.exports = digits => {
  const first = digits[0];

  for (const digit of digits) {
    if (digit !== first) {
      return true;
    }
  }

  return false;
};

module.exports = digits => {
  const first = digits[0];

  for (let i = 1; i < digits.length; ++i) {
    if (digits[i] !== first) {
      return true;
    }
  }

  return false;
};

--- 
+++ 
@@ -1,8 +1,8 @@
 module.exports = digits => {
   const first = digits[0];
 
-  for (const digit of digits) {
-    if (digit !== first) {
+  for (let i = 1; i < digits.length; ++i) {
+    if (digits[i] !== first) {
       return true;
     }
   }
Refactor index loop to for-of loop
