1. Height of Blue ball bounce
Basketball from 10 meters high place falls, each bounce height is the original 0.3 times times, asked to bounce 10 times after the height of the basketball.
<script type= "Text/javascript" > var b=10for (var a=1; a<=10;a++) {B=b*0.3}alert (b) </script>
2. The board put food
The chessboard has 32 squares, the first lattice puts 1 sesame seeds, the second one puts 2, the third one puts 4, the fourth one puts 8 ... The weight of each sesame is 0.00001kg, if you want to fill the whole board, how much weight of sesame seeds required.
<script type= "Text/javascript" >var a=1var zhima=1for (var c=1;c<32;c++) {A=a*2;alert (a) Zhima=zhima+a } Alert (Zhima) var d=zhima*0.00001alert (d) </script>
3, 100 and 7 related to the number
<script type= "Text/javascript" >for (var i=0;i<100;i++) {if (i%7==0| | i%10==7| | parseint ((i%10)) ==7) {alert (i)}} </script>
4 multiplication Formulas
<script type= "Text/javascript" >for (var i=1;i<10;i++) {for (Var j=1;j<10;j++) {if (j>i) {alert (i+ "*" +j)} }} </script>
JavaScript Loop Practice