JSFiddle - React, Tailwind, and code Playground

by Jessie Lau

JavaScript

function randomArr(){
	var arr1 = [];
    var arr2 = [];
    var chars = "ED";
    for(var i = 0; i < 10; i++){
    	arr1.push(chars.charAt(Math.floor(Math.random() * chars.length)));
    }
    for(var j = 0; j < 10; j++){
    	arr2.push(chars.charAt(Math.floor(Math.random() * chars.length)));
    }
    return [arr1,arr2];
}
console.log(randomArr());