Intermediate Algorithm Scripting - DNA Pairing

Tell us what’s happening:
Describe your issue in detail here.
can you tell me the problem of my code, thank you

   **Your code so far**
function pairElement(str) {
let result = [];
for(let element of str) {
if(element === "A") {
 } else if(element ==="T") {
} else if (element === "C") {
} else  (element === "G") {
 return result;

   **Your browser information:**

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

Challenge: Intermediate Algorithm Scripting - DNA Pairing

Link to the challenge:

You have a slight mistake here that’s throwing off your code. Else cannot be followed by a condition.

1 Like

thank you very much.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.