JSFiddle - React, Tailwind, and code Playground

JavaScript

// Open the console to watch

var left = 'color:#6A287E'; // Dark purple
var right = 'color:#7F38EC'; // Light purple
var A = 'color:#736AFF'; // Blue
var T = 'color:#F5FF6B'; // Yellow
var G = 'color:#4CC417'; // Green
var C = 'color:#E42217'; // Red
var pairs = [[A, T], [C, G]];

var helix = [
        "    %cO    ",
        "   %co%c=%cO   ",
        "  %c0%c=%c==%c0  ",
        "\xA0 %c0%c=%c==%c0  ",
        "   %cO%c=%co   "
    ];

function getRand() {
	return Math.round(Math.random());
}

var i = 0;
function showHelix() {
	i = i%5;
    switch(i) {
    	case 0:
    		right = [left, left = right][0];
        	console.log(helix[i%5], right);
        	break;

        case 2:
        case 3:
        	var pair = pairs[getRand()];
        	var which = getRand();
        	console.log(helix[i], left, pair[which], pair[which ? 0 : 1], right);
        	break;

        case 1:
        case 4:
        	var base = pairs[getRand()][getRand()];
        	console.log(helix[i], left, base, right);
    }

    i++;
}

setInterval(showHelix, 275);