DNA Pairing tell me whats wrong with my code

DNA Pairing tell me whats wrong with my code
0.0 0

#1

Tell us what’s happening:
what is wrong with my code

Your code so far


function pairElement(str) {
  str = str.toUpperCase();
  str = str.split("");
  var placeHolderArray = [];
  for (var i = 0 ; i<str.length; i++){
    if(str[i]=="A"){
      placeHolderArray.push(["A", "T"]);

    }else if (str[i]=="T"){
      placeHolderArray.push(["T", "A"]);
    }else if (str[i]=="C"){
      placeHolderArray.push(["C", "G"]);
  }else if (str[i]=="G"){
      placeHolderArray.push(["G", "C"]);}
  return placeHolderArray;
}
}
pairElement("GCG");

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/dna-pairing


#2

You are so close. The logic is sound, it’s a syntax error.

Check your curly brackets :grinning:


#3

where???bro


#4

Why is your return statement where it is?