Contact UIO EN anytime, any day of the year (24/7 including public holidays).

UIO EN

Website design for micro business -> small -> medium | online marketing, image design, infographic, corporate branding video, restaurant, hotel, store, entertainment.

SUM STARS IN ARRAY

SUM STARS IN ARRAY

Link

1var list = document.querySelectorAll("tbody td");2
3var stars = [];4var stars_row = [];5var stars_last = [0,0,0,0,0,0];6var sum = 0;7for (var i = 0; i < list.length; i+ ) {8
9if (i%6 == 0) { 10if (stars_row.length == 0 ) { continue; }11stars_row.push(sum); 12stars.push(stars_row); 13var stars_row = []; 14var sum = 0; 15
16continue;17};18
19var count = (list[i].textContent.match(/★/g) || []).length;20sum = count;21stars_row.push(count);2223stars_last[i%6] = stars_last[i%6] count;24}25stars_row.push(sum); 26stars.push(stars_row); 27stars_last.shift();28stars.push(stars_last);29console.table(stars);30

CONTACT

Drop us your details and we will be on touch!.

+

UIO EN

CALLTELEGRAMZALO