+ 1
Hello everybody. As in function through parameters to change array ckam[] on other array ckam2[]?
function opred(){//Š¾ŠæŃŠµŠ“.ŠŗŠ¾Š¾ŃŠ“ŠøŠ½Š°Ń. left Š±ŠµŠ· px for(var u=0;u<ckam[claskam].style.left.length;u++){ if(ckam[claskam].style.left[u]!="p"&&ckam[claskam].style.left[u]!="x"){ if(u!=0){ znach=znach+""+ckam[claskam].style.left[u]; } else{ znach=ckam[claskam].style.left[u]; } }} return znach; }
1 Answer
+ 3
What are you exactly trying to achieve? I quite cannot understand.
Also, instead of iterating over the string, you can parse it as int or float.
x = ckam[claskam].style.left;
// suppose x is "192.6px"
y = parseInt(x);
// now y is 192
z = parseFloat(x);
// now z is 192.6