Why is this only passing 3 out of 5

function sumOfPrimeFactors(n) {
    let finalNumber=0;
    let realArr=[];
    let finalArr=[];
  for(let i=2;i<n;i++){
    if(n%i===0){
      //console.log(i);
      finalArr.push(i);
      
    }
  }

  let figer=[];
    
    //console.log(finalArr)
    for(var j=0;j<finalArr.length;j++){
        var testArr=0;
      for(var k=2;k<finalArr[j];k++){
        //console.log(`j is ${j}`);
        //console.log(`k is ${k}`)
        if(finalArr[j]%k!==0){
          testArr+=1;
        }
        
      }
      //console.log(testArr)
      //console.log(testArr);
      if(testArr===finalArr[j]-2 && finalArr[j]!==2){
          
          realArr.push(finalArr[j]);
      } 
      
    }
    //console.log(realArr);
    for(var w=0;w<realArr.length;w++){
      finalNumber+=realArr[w];
    }
    return finalNumber
}


  console.log(sumOfPrimeFactors());

// Leave this so we can test your code:
module.exports = sumOfPrimeFactors;
      • Preformatted text

`

Hello @digital8622746109, welcome to the forums! Can you please post a link to the exercise, as well as any relevant details about what your code is trying to do, as well as what tests it’s failing/passing?