I don't get what I'm supposed to do for DNA Pairing exercise

I don't get what I'm supposed to do for DNA Pairing exercise
0.0 0

#1

I’m blanking a bit here. Are we just supposed to take the input pairElement("GCG") and translate each value into an array or arrays? In the example it gives us [["G", "C"], ["C","G"],["G", "C"]] as the answer. Does that mean whenever you see ‘G’ as an input it must be output as GC? If so how are we supposed to work out what other input pairs are supposed to be like pairElement("TTGAG") Should I just backwards engineer from the test inputs or is there another way to figure out the ‘value’ of these inputs?


#2

DNA is made up four compounds. I forgot the names, but their names start with T, A, G, and C. In DNA, the T compound is always paired with the A compound, and the G compound is always paired with the C compound.

For each letter in the input string, you’ll output an array which contains the original letter and its pair.


#3

Thanks, I’ve learned something about DNA and coding today! :smile: D