我想问一下这个老师
var arr = [1,2,3,4,5]
for(n in arr){
if(n>2){
break
}
console.log(n)
}
for in 不能break?
var arr = [1,2,3,4,5]
for(n in arr){
if(n>2){
break
}
console.log(n)
}
for in 不能break?
2018-12-14
var stock = function () {
return Math.random()*1000
}
var price = 100;
var limit = 15;
while (price > limit) {
price = stock();
console.log(`${price}`)
}
不需要那么麻烦吧?
return Math.random()*1000
}
var price = 100;
var limit = 15;
while (price > limit) {
price = stock();
console.log(`${price}`)
}
不需要那么麻烦吧?
2018-12-01