JSFiddle - React, Tailwind, and code Playground

by Daniil464

JavaScript

var costschamp = [0.30, 0.4, 0.43, 0.44, 0.45, 0.55, 0.66, 0.67, 0.78, 0.7];
              let arr = [];
for(i=0; i<costschamp.length;i++){arr.push(parseFloat(costschamp[i]*50).toFixed(2))}
              console.log(arr);
              
              
              function refresh4() {
let str = document.getElementById("fromacclvl").value;
let str2 =  document.getElementById("toacclvl").value;
let num = Number(str);
let num2 = Number(str2);
if(num >= num2){document.getElementById("toacclvl").value=num+1;}
if(num < 19 && num+4 > num2){document.getElementById("toacclvl").value=num+4;}
if(num < 4 && num+4 > num2){document.getElementById("toacclvl").value=num+5;}
if(num2 > num+10){document.getElementById("toacclvl").value=num+10;}
    var fromacclvl = document.getElementById("fromacclvl").value;
    var toacclvl = document.getElementById("toacclvl").value;
	calc4(fromacclvl, toacclvl);
    changeImg4(fromacclvl, toacclvl);
	document.getElementById('fromacclvln').innerHTML = fromacclvl;
	document.getElementById('toacclvln').innerHTML = toacclvl;
	document.getElementById('fromlvl').value = fromacclvl;
	document.getElementById('tolvl').value = toacclvl;
	
}