DNA Pairing Unique Problem

DNA Pairing Unique Problem
0
#1

So my code returns the right array for all the inputs on pairElement() but i cannot proceed. i printed the result to the console to check and all the result are correct . Below is the code

function pairElement(str) {
var pairs = ["GC","AT"]                                                               //prepare the pairs
var items = str.split("");                                                               //turn str to array items
var arr = [];                                                                                 //initialize the collector
for(let x = 0; x < items.length; x++){    
   var c = (pairs.filter((m)=> m.includes(items[x]))).toString();    //filter out pairs using each item 	
   var pair = c.split(items[x]).join("");                                           //get pair from pairs   
   arr.push(`["${items[x]}","${pair}"]`);                      //Concat pair with item and pass to collector 
}
	return arr;
} 
pairElement("GCG"); 

Please Assist.

#2

This is what you should be returning:
image

This is what you are returning:
image

Do you see the difference?

#3

Oh dear, I see it now. the problem is around here “arr.push(["${items[x]}","${pair}"]);”
I have got it. Many thanks!.