wanted a solution on how to access the javascript variable inside the java scope. In the below code, <%=toppings[k]%> k is a javascript variable how can i access that, I am getting a message as k is not known to JVM
function value_transitAccountCounter(i){
alert('welcome -->'+i);
for(var k=0;k<5;k++){
if(i==k){
return '<%=toppings[k]%>';
}
}
}