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

Studi Kasus Aplikasi Farm and Poultry part III

Beranda › Forums › Belajar Menjadi Full Stack Web Developer Tingkat Menengah › Studi Kasus Aplikasi Farm and Poultry part III

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #48008

    let id = poultries[poultries.length -1].id + 1;
    saya masih ga paham gimana logika dari pengambilan id terakhir ini coach,
    “poultries[poultries.length -1]” kalau ini kan untuk dapetin index terakhir, trus kenapa pakai “.id +1” lagi coach kalau udah pakai -1 pada “poultries.length -1”

    #48082
    Coach Vincent
    Moderator

      untuk id diperlukan increment atau menambah secara otomtis sehingga diperlukan + 1.

    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