Tell us what’s happening:
Ey! how are you?
I need some help, i do not really know what’s wrong with this code Can you help me? Thanks!
Happy Coding!
Your code so far
function pairElement(str) {
let final = [];
final= Array.from(str).map(function(x)
{ let template= [];
switch (x){
case "G":
template.push(["G","C"]);
break;
case "C":
template.push(["C","G"]);
break;
case "A":
template.push(["A","T"]);
break;
case "T":
template.push(["T","A"]);
break;
}
return template;
});
return final;
}
pairElement("GCG");
console.log(pairElement("GCG"));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
.
Link to the challenge: