Hello i'd like to ask a simple question, here example code
<script>
var mycars=["Saab","Volvo","BMW","Honda","BMW","Suzuki","Volvo","Toyota","Saab","Nissan"];
var count=0;
for (i=0;i<mycars.length;i++)
{
document.write(mycars[i] + "<br>");
count++;
}
document.write("Total Data is "+count);
</script>
from example above it will output : Saab Volvo BMW Honda BMW Suzuki Volvo Toyota Saab Nissan Total Data is 10
how if i want to call each cars just once like BMW,Volvo and Saab it's called twice, and i want it called once then the total data will 7.
how can i give boolean condition for this? so it wont called again? thanks
"); }' – Paul Feb 23 '14 at 04:08