Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiorosa1 authored Mar 17, 2019
1 parent 6ebf228 commit 890e482
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Intermediate Algorithm Scripting/dna-pairing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"index.js":"function pairElement(str) {\n // TA, GC, AT, CG -- acceptable pairs\n let pairArray = [];\n // turn the string into an array\n str = str.split('');\n // loop through the string array and match the pairs accordingly\n for(let i = 0; i < str.length; i++){\n switch(str[i]){\n case \"G\":\n pairArray.push([\"G\",\"C\"]);\n break;\n case \"C\":\n pairArray.push([\"C\",\"G\"]);\n break;\n case \"T\":\n pairArray.push([\"T\",\"A\"]);\n break;\n case \"A\":\n pairArray.push([\"A\",\"T\"]);\n break;\n }\n }\n return pairArray;\n}\n\npairElement(\"GCG\");"}

0 comments on commit 890e482

Please sign in to comment.