Люди наконец то у меня все получилось, хотя хочу признаться намного благодаря профессиональному программисту рони,
вот код если каму нибудь понадобиться.
var text1 = "text";
var text2 = "text";
let actions = [20, 18, 16, 14, 12, 10, 8, 6, 4, 2]
let buttons = document.querySelectorAll('.page');
for (let i = 0; i < buttons.length; i++) {
let button = buttons[i];
let result = i % 10;
button.onclick = function(e) {
document.querySelector(".action span").innerHTML = text1 + actions[result] + "%" + text2;
};
};
|