举个简单的例子:篮球初始高度5米,往下落,弹起,每次弹起是原来的30%,问经过几次弹起,高度小于0.1
var h=5 var i=0; while(true){ h=h*0.3 if(h<0.1){ break; } i++ } document.write(i)