Home > front end >  Testing data
Testing data

Time:03-19

0 5 7 9 6
2 4 3 2 1
1, 3, 4, 5, 8
Five the number of columns, each column 3 Numbers, a special number 3, find out how many a 3.
Rule: from the first column, is to be a row, as above, the first column 3, the second column without the entire meter only the first column (3) the first column is not the entire meter only 0. First, the second column, the third column not the fourth column, is the first, second column 3.

CodePudding user response:

 let count=0; 
,5,7,9,6 let arr=[[0],,4,3,2,1 [2], [3,4,5,8,1]].
For (the let I=0; i<5; I++)
{
For (let j=0; j<3; J++)
{
If (arr [j] [I]==3)
{
count++;
}
}
}
The console. The log (count);
don't know if this is right,
  • Related