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

Function

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #48961
    Tufel Shobrun
    Participant

      Slamat pagi kak vincent

      Saya mau tanya kak
      Ini codingan saya knapa ngga running ya kak
      Padahal tidak ada error ?
      Saya itu niat nya mau bikin output nya nanti
      Kluuar nya tulisan “durian” gtu kak

      Berikut saya lampir kan coding nya kak

      function changetoobject(array) {
      var buah=[‘durian’,75000,true];
      var result={
      jenis:buah.array[0],
      harga:buah.array[1],
      enak:buah.array[2],
      }
      return result;
      }
      console.log(changetoobject(result.jenis));

      Gmna ya kak ?

      Trimaksih

      #49017
      Coach Vincent
      Moderator

        dapat ditulis seperti ini kak:

        console.log(changetoobject([‘durian’,75000,true]))

      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