As going through the site i got how to access the model in javascript and how to loop it in javascript. i am using text tag to access the item in a model. when i use i am not able to add break.
@foreach (var item in Model.ArrayDetails)
{
var checklower = false;
var checkUpper = false;
var loopentered = false;
<text>
if(@item.Id ==1)
{
if(@item.LowerBound <= obj.value)
{
loopentered=true;
checklower=true;
}
if(loopentered)
{
alert(@item.UpperBound <= obj.value);
if(@item.UpperBound <= obj.value)
{
checkUpper = true;
}
}
if(checkUpper && checklower)
{
***// here i want to add break statement(if i add javascript wont work)***
}
}
</text>
}
Can some one suggest me how can solve this.