Upgrade Skill Di ITBOX Jadi Lebih Hemat
Special Diskon 50%
Sampai 16 November 2026!
Hari
Jam
Menit
Detik
GARUDABOX

Nested Looping

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #200609
    Mikail Jordan
    Participant

      for(var i = 1; i <= 5; i++){
      var temp = ”;
      for(var j = 1; j <= i; j++){
      temp = temp + j;
      }
      console.log(temp);
      }

      saya bingung pada bagian ini j = 1; j <= i kenapa j <= i? padahal kan sama sama bernilai 1 coach?
      mohon bimbingannya

      #200660
      Coach Vincent
      Moderator

        untuk di cek jika sama dgn 1, maka akan di masukkan ke dalam temp nya

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.
      Shopping cart0
      There are no products in the cart!
      Continue shopping