how i can print the elements before a spicific value in array queue?

how i can print the elements before a spicific value in array queue?

how i can printall elements befor the spicific value and print this value also

View Answers

January 8, 2011 at 4:05 PM

Hi Friend,

Try this:

<html>
<script>
var arr=new Array();
arr[0]=10;       
arr[1]=20;
arr[2]=30;
arr[3]=40;       
arr[4]=50;
arr[5]=60;
arr[6]=70;       
arr[7]=80;
arr[8]=90;
arr[9]=100;
var i;
var num=window.prompt("Enter array element: ");
document.writeln("The value is: "+num+"<br>");
for(i=0;i<arr.length;i++){
if(arr[i]<num){
document.writeln(arr[i]+"<br>");
}
}
</script>
</html>

Thanks

Ads









Related Tutorials/Questions & Answers:
how i can print the elements before a spicific value in array queue?
If Sessin Contain Array how can i get each value.
Advertisements
how to sort the elements of hashmap and to print output the key and the value attached to it
how can i print the selected content of a frame
How to move a value in array?
How to move a value in array?
How to Print Array in JavaScript
how i can creat string array, with global visibility.
how i can creat string array, with global visibility.
how to store jtable value in multidimensional array?
how to store jtable value in multidimensional array?
How to Prepend Array in PHP
how to check and print the no of times an integer is repeated in an array
JavaScript array print
How do I initialize a byte array in Java?
How can i Change Button Label Value Randomly in VIRTUAL KEYBOARD using JAVA or Net Beans ???
How can i Change Button Label Value Randomly in VIRTUAL KEYBOARD using JAVA or Net Beans ???
i need to print customer[1] is abcd,cbnb using array
i need to print customer[1] is abcd,cbnb using array
i need to print customer[1] is abcd,cbnb using array
i need to print customer[1] is abcd,cbnb using array
please tell anybody how can i set a value in hiperlink for edit n delete link
how insert data from databse in array and compare new data to already stored value in array
How can print integer in method
how do i begin a two dimensional array?
I want to know the all possible syntax for EL code to print the first element of an array.
Find in Array - Calculate Occurrences of Elements in Array
How to load elements from db when i press next.
ModuleNotFoundError: No module named 'print_array'
ModuleNotFoundError: No module named 'queuey'
Selecting elements of 2D array with GUI

Ads