/javascript/rna-transcription/rna-transcription.js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
var dna2rna = {
  'G': 'C',
  'C': 'G',
  'T': 'A',
  'A': 'U'
};

var toRna = function(dna){
  return dna.split('').map(function(base) {
    return dna2rna[base];
  }).join('');
};

module.exports = toRna;

Comments


You're not logged in right now. Please login via GitHub to comment