DNA Pairing tell me whats wrong with my code

DNA Pairing tell me whats wrong with my code
0.0 0


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++){
      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;

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:


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

Check your curly brackets :grinning:




Why is your return statement where it is?