<! DOCTYPE html>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title> Process Control Statements </title>
<script type= "Text/javascript" >
The first step is to write the previous data in the form of an array, defining the variable as Infos
var Array = [
[' Small a ', ' female ', 21, ' freshman '],
[' small B ', ' Male ', 23, ' Junior '],
[' Small C ', ' Male ', 24, ' senior '],
[' small d ', ' female ', 21, ' freshman '],
[' small e ', ' female ', 22, ' senior '],
[' Small f ', ' male ', 21, ' freshman '],
[' small g ', ' female ', 22, ' sophomore '],
[' Little H ', ' female ', 20, ' Junior '],
[' Small I ', ' female ', 20, ' freshman '],
[' Little J ', ' Male ', 20, ' juniors ']
];
var b;
First screening, finding all the information that's a freshman.
for (i=0;i<10;i++) {
if (array[i][1]== ' female ') {
if (array[i][3]== ' freshman ') {
B=ARRAY[I][0];
document.write (b);
}
}
}
Second screening, find out all the girls ' information
</script>
<body>
</body>
The application of two-dimensional arrays, small instances,