Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 749 Bytes

protein-translation.md

File metadata and controls

27 lines (19 loc) · 749 Bytes

Concepts of protein translations

Example implementation

General concepts

  • Constants
  • Using Objects as Maps or
  • Using a Map and accessing it via Map#get
  • Accessing Objects using bracket notation
  • Creating functions
  • breaking out of a loop
  • throwing Errors
  • Pushing into an array

Depending on implementation could also be:

When using a for loop to parse and translate rna in one go

  • Using for-loops
  • Using for-loops with custom step size
  • Using String#substring to access parts of

When first splitting then translating rna

  • Using String.match(/.{1,3}/g) to get codons
  • Using Array#reduce to create the response