DNA Pairing, unable to understand how pairing is created

Tell us what’s happening:

Your code so far


function pairElement(str) {
  return str;
}

pairElement("GCG");

Your browser information:

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

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

Question: Unable to understand how pairing is going on…

There are 4 possible combinations of pairs.

["A","T"]
["T","A"]
["C","G"]
["G","C"]

If you are given first item in these arrays, you need to pair them with 2nd item in the arrays. For example,

pairElement(“ATCGA”) should return [["A","T"],["T","A"],["C","G"],["G","C"],["A","T"]]