Ignore!! Found the solution after a while and waiting for a moderator to delete this.
Tell us what’s happening:
I don’t understand why this solution does not work. Trying to console.log(newArr) after forEarch has been executed is returning null. What am I missing?
Your code so far
function pairElement(str) {
let pairing = {
"A": "T",
"T": "A",
"C": "G",
"G": "A"
}
let arr = str.split("");
let newArr = [];
arr.forEach(function(element){
newArr.push([element, pairing[element]]);
}
);
return newArr;
}
pairElement("ATCGA");
Link to challenge:
I can’t post links yet, so here is the slug: intermediate-algorithm-scripting/dna-pairing
I tried that. I get a prompt saying “You don’t have permission to delete this topic. If you really want it to be deleted, submit a flag for moderator attention together with reasoning.” Haven’t figured out how to flag yet!