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.1.0.41 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.40 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.39 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.38 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.37 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.36 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.34 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.33 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.32 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.31 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.30 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.29 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.28 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.27 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.26 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.25 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.24 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.23 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.22 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts
trackler-2.1.0.21 tracks/typescript/exercises/rna-transcription/rna-transcription.example.ts