Sha256: 2c6330ca1513cc7e888cc64a8e85e3049c929c06acd6ced458fa5f35c53f515d

Contents?: true

Size: 432 Bytes

Versions: 295

Compression:

Stored size: 432 Bytes

Contents

class Transcriptor {
    toRna(input: string): string {
       const dictionary: {[key: string]: string } = { G: "C" ,  C: "G" , T: "A" ,  A: "U"  }
        let temp = ""
        input.split("").forEach((element) => {
            const current = dictionary[element]
            if (current === undefined) { throw new Error('Invalid input DNA.')}
            temp += current
    })
        return temp
}
}
export default Transcriptor

Version data entries

295 entries across 295 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.118 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.117 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.116 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.115 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.114 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.113 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.111 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.110 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.109 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.108 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.107 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.106 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.105 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.104 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.103 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.102 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.101 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.100 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.2.1.99 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts