javascript - JS不换行输出到控制台的语句是什么?
ringa_lee
ringa_lee 2017-04-11 10:43:24
0
1
2553
ringa_lee
ringa_lee

ringa_lee

membalas semua(1)
小葫芦

http://codepen.io/momoko8443/...

var str = "";
for(var i=1;i<=9;i++){
  for(var j=1;j<=i;j++){
    str += i + "*" + j + "=" + i*j + " ";
    if(i === j){
      str += "\n";
    }
  }
}
console.log(str);
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan