RNA transcription in Javascript