how to connect strings and VAR in javascript : This is my script code :


  

    <script type="text/javascript">
    <!---Calculation--->
    $(document).ready(function(){
    	var o = 0;
    	o=o+0;
        for(o; o<=100; 0++){
            	var price=$("#price").html();
            	var i=1;
            	var add;
            	var subtr;
            	var qty;
            	$('#add').click(function(){	
            		qty = $('#pro_qty').val();
            		add = Number(qty) + Number(i);
            		result= Number(price)* (Number(qty) + Number(i));
            			
            		$('#pro_qty').val(add);
            		$('.result').html(result);
            	});
            	
            	$('#subtr').click(function(){
            		if(qty>1){
            			all_price=$('.result').text();
            			result=Number(all_price)- Number(price);
            			qty=$('#pro_qty').val();
            			subtr = Number(qty)-1; 
            			$('.result').html(result);
            			$('#pro_qty').val(subtr);
            			
            		}else{
            			$('#pro_qty').val(1);
            			$('.result').html(price);
            			}
            	});	
        }
    });
    
    </script>         

And now I want to connect Var S with the others in FOR loop
For example :

    all_price=$('.result + s').text(); 

     

=> and the result I want to have :  

all_price=$('.result1').text(); ,all_price=$('.result2').text(); .......

How can I do like that code ???

Thanks in advanced