You are viewing a single comment's thread. Return to all comments →
JS
function gemstones(arr) { let elemetosGema = []; for(var i = 97; i <= 122; i++) { let countGema = 0; let charElement = String.fromCharCode(i); for(var z= 0; z < arr.length; z++) { if(arr[z].indexOf(charElement) !== -1){ countGema++; } } if(countGema === arr.length) { elemetosGema.push(charElement) } } return elemetosGema.length; }
Seems like cookies are disabled on this browser, please enable them to open this website
Gemstones
You are viewing a single comment's thread. Return to all comments →
JS