Intermediate Algorithm Scripting: DNA Pairing

Tell Us What’s Happening So Far:
I’ve coded a simple for…loop with if statements to handle the DNA pairing problem:

Your Code So Far:

function pairElement(str){
  let dNa=[];
  for(let i=0;i<str.length;i++){
  return dNa;

Even though the output appears correct, FCC wont accept this solution. Can anyone tell me what I’m doing wrong?

What do the failing tests say?

Sorry, I’m using because I believe it’s console.log() function is more flexable and I didn’t copy the code over to FCC correctly. It passed. :grimacing: