DNA Pairing, unable to understand how pairing is created

Tell us what’s happening:

Your code so far

function pairElement(str) {
  return str;


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:

Question: Unable to understand how pairing is going on…

There are 4 possible combinations of pairs.


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"]]