<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3950729017636573179</id><updated>2025-12-16T14:18:00.530+07:00</updated><category term="Javascript"/><category term="aplikasi web"/><category term="android"/><category term="tips dan trik"/><category term="windows"/><category term="tutorial"/><category term="Tracfone Promo Codes"/><category term="article dan kesehatan"/><category term="Cell Phone Tips"/><category term="Cell Phone Reviews"/><category term="Software"/><category term="software gratis"/><category term="Tech News"/><category term="Cell Phone Money Saving Tips"/><category term="Tracfone Discounts and Deals"/><category term="wallpaper"/><category term="Tracfone Android Smartphones"/><category term="Tracfone News and Updates"/><category term="game"/><category term="Pemrograman"/><category term="troubleshooting"/><category term="bisnis"/><category term="ms office"/><category term="teknologi"/><category term="youtube"/><category term="C++"/><category term="chrome"/><category term="instagram"/><category term="tahukah anda"/><category term="facebook"/><category term="word"/><category term="Email"/><category term="HTML"/><category term="Tracfone BYOP"/><category term="excel"/><category term="iPhone"/><category term="whatsapp"/><category term="Apple iPhone"/><category term="LG Smartphones"/><category term="Samsung Galaxy Stardust"/><category term="antivirus"/><category term="nonton online"/><category term="service android"/><category term="ulasan produk"/><title type='text'>Enun Solutions</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://enunsolutions.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default?start-index=26&amp;max-results=25'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>283</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-2648292959951903939</id><published>2021-04-20T20:54:00.001+07:00</published><updated>2021-04-20T20:54:47.808+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="article dan kesehatan"/><title type='text'>Interaksi Manusia dan Komputer (IMK) - Latihan Pertemuan 3</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: large; font-weight: 700;&quot;&gt;Latihan&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: medium;&quot;&gt;&lt;b&gt;Pertemuan 3&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;1. Kombinasi warna terbaik untuk latar belakang warna merah adalah…&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; a. Biru, Hitam, Hijau&lt;/span&gt;&lt;span style=&quot;color: yellow;&quot;&gt;&lt;span style=&quot;background-color: lime;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px;&quot; /&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: yellow;&quot;&gt;&lt;span style=&quot;background-color: lime;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&amp;nbsp; b. Kuning, putih, hitam&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; c. Putih, biru, cyam&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; d. Merah, kuning, biru&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;2. Echoic pada memori penyaring manusia digunakan untuk menerima rangsangan berupa…&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; a. Sentuhan&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; b. Penglihatan&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; c. Suara&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; d. Perasa&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;3. Kecepatan kinerja yang tinggi, tingkat kesalahan yang rendah dan kepuasan yang tingggi dapat dihasilkan jika :&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; a. Pemakai masih pemula sehingga tidak keberatan&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; menunggu waktu yang lama.&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; b. Selalu ada hiburan yang menarik perhatuan pada setiap&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; c. Ada umpan balik yang jelas tentang kemajuan kearah&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; solusi.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; d. Pemakai sabar dan berlatar belakang budaya yang&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cenderung lambat.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;4. Sehubungan dengan motivasi bagi faktor-faktor manusia dalam perancangan, manakah dari pernyataan-pernyatan berikut yang harus diperhatikan oleh perusahaan yang mengembangkan pengendali lalu lintas udara :&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp; a. Biaya perlu ditekan agar rendah, meski kehandalan&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sedikti dikorbankan.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp; b. Waktu pelatihan yang lama tidak menjadi masalah asal&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; kinerja pemakai cepat dan bebas kesalahan.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&lt;span style=&quot;background-color: #cc0000;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp; c. Perancangan system sulit, perancang harus membuat&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; system transparan sehingga pemakai mudah terserap&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #cc0000;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dalam bidang-bidang tugasnya.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp; d. Kecepatan kinerja penting tetapi kesalahan operator&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ditoleransi.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;5. Dari jenis pekerjaan mana yang memberikan beban paling besar pada tangan, pergelangan tangan, jari jemari dan lengan?&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; a. Pemasukan data&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; b. Pekerjaan interaktif&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; c. Akuisisi data&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; d. Pengolahan kata.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;6. Dari jenis pekerjaan mana yang memberikan beban paling besar pada kognitif, persepsi yang tinggi serta beban otot yang rendah?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; a. Pemasukan data&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; b. Pekerjaan interaktif&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; c. Akuisisi data&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; d. Pengolahan kata&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;7. Dalam perancangan antarmuka pemakai, apa yang dapat kita lakukan untuk mengakomodasi expert frequent user?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; a. Meningkatkan kepercayaan diri dengan memudahkan&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pemakai dengan melakukan task sederhana.&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; b. Sering memberikan pertanyaan dan pesan-pesan berarti&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; seperti “are you sure you want exit this program?”&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp; c. Perlu melindungi pemakai dari kemungkinan kesalahan&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; karena coba-coba menjelajah sendiri.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: 20px; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp; d. Menyediakan shortcuts, singkatan-singkatan, makro agar&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Poppins, serif; font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 20.7px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tugas dapat diselesaikan dengan lebih cepat.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Arial, Helvetica, sans-serif; font-size: large; text-align: justify;&quot;&gt;&amp;nbsp;Soal diatas mengandung jawaban yang kalimat berwarna merah, Jawaban di atas kami tidak bertanggung jawab benar atau tidaknya. Terimakasih sudah berkunjung.&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/2648292959951903939'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/2648292959951903939'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2021/04/interaksi-manusia-dan-komputer-imk.html' title='Interaksi Manusia dan Komputer (IMK) - Latihan Pertemuan 3'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-7580468153432057454</id><published>2020-05-13T08:10:00.000+07:00</published><updated>2020-05-13T08:10:02.185+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tech News"/><title type='text'>Jumlah Kasus Virus Corona di Indonesia Jadi 14.749 per 12 Mei 2020, Tambah 484</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVwWplEqC0sohXV60Kjo-y5UGwLvXaWHJICUPykFdgEN6j4nuxkqQdKgcq0cELPixn7sbF9BsaKsSm6a1Ta54CRXIcxlKQTOSxJH3psSQ7ju1Cs-GJZS4TTP77E15n45vUotkXao7zXEc/s1600/jubir-pemerintah-untuk-penanganan-virus-corona-covid-19-achmad-yurianto.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;393&quot; data-original-width=&quot;700&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVwWplEqC0sohXV60Kjo-y5UGwLvXaWHJICUPykFdgEN6j4nuxkqQdKgcq0cELPixn7sbF9BsaKsSm6a1Ta54CRXIcxlKQTOSxJH3psSQ7ju1Cs-GJZS4TTP77E15n45vUotkXao7zXEc/s400/jubir-pemerintah-untuk-penanganan-virus-corona-covid-19-achmad-yurianto.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Kasus virus corona (Covid-19) di Indonesia kembali bertambah pada Selasa (12/5/2020).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Hingga Selasa (12/5/2020) sore, terdapat penambahan sebanyak 484 orang.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Sehingga total kasus virus corona di Indonesia menjadi 14.749 orang, seperti dilansir TribunTernate.com dari KompasTV.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Sejauh ini, pemerintah mengumumkan penambahan pasien sembuh ada 182, total ada 3.063 orang dinyatakan sembuh.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Sedangkan untuk pasien yang meninggal dunia ada 16 orang hingga sore ini total menjadi 1.007 orang.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Updata Corona Global per Selasa (12/5/2020) Siang&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Per Selasa (12/5/2020) pukul 12:32 WIB hari ini, situs gisanddata.maps.arcgis.com mencatat total kasus Covid-19 terkonfirmasi di seluruh dunia ada 4.177.584 kasus.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Sejauh ini, tercatat sudah ada sepuluh negara yang memiliki jumlah kasus Covid-19 terkonfirmasi di angka lebih dari 100.000, 200.000, bahkan melebihi angka 1.000.000.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Sepuluh negara tersebut juga jumlah kasus Covid-19 terkonfirmasi-nya melebihi China.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/7580468153432057454'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/7580468153432057454'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/05/jumlah-kasus-virus-corona-di-indonesia.html' title='Jumlah Kasus Virus Corona di Indonesia Jadi 14.749 per 12 Mei 2020, Tambah 484'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVwWplEqC0sohXV60Kjo-y5UGwLvXaWHJICUPykFdgEN6j4nuxkqQdKgcq0cELPixn7sbF9BsaKsSm6a1Ta54CRXIcxlKQTOSxJH3psSQ7ju1Cs-GJZS4TTP77E15n45vUotkXao7zXEc/s72-c/jubir-pemerintah-untuk-penanganan-virus-corona-covid-19-achmad-yurianto.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-5823052951952837075</id><published>2020-05-10T16:57:00.001+07:00</published><updated>2020-05-10T16:57:10.494+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Tech News"/><title type='text'>Belanda Temukan Antibodi yang Mampu Tangkal Virus Corona!</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjWDz5Wlz_a13lkid7eaS29YC4AM69N9DfE97G2o8D2RAZKzhqWLgHMth7lGwT82cRsbEQGb95hZVq7u-_n7qb8Xyo_KumTrrVuZ2Ts9_6KWJle2Q_-HVUarBlR_LDXxxvtbh1_Ucb2LY/s1600/covid19+enun+solutions+news.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;402&quot; data-original-width=&quot;715&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjWDz5Wlz_a13lkid7eaS29YC4AM69N9DfE97G2o8D2RAZKzhqWLgHMth7lGwT82cRsbEQGb95hZVq7u-_n7qb8Xyo_KumTrrVuZ2Ts9_6KWJle2Q_-HVUarBlR_LDXxxvtbh1_Ucb2LY/s400/covid19+enun+solutions+news.jpeg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;News, Enun Solutions&lt;/b&gt; - Peneliti Utrecht University, Erasmus Medical Centre Belanda dan Harbour BioMed dilaporkan telah menemukan antibodi monoclonal yang memblokir infeksi virus corona baru penyebab Covid-19.&lt;br /&gt;
&lt;br /&gt;
Antibodi yang bernama 47D11 ini akan menyerang protein mahkota di tubuh Covid-19. Mahkota berduri inilah yang menempel pada sel manusia, kemudian memasukkan materi genetik guna berkembang biak di tubuh inangnya.&lt;br /&gt;
&lt;br /&gt;
Antibodi ini mengikat pada enzim ACE2 yang diidentifikasi sebagai reseptor Covid-19 ketika menyerang tubuh manusia. Antibodi ini pun sudah berhasil menetralkan Covid-19 dalam percobaan pada tikus.&lt;br /&gt;
&lt;br /&gt;
&lt;script async=&quot;&quot; src=&quot;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;

&lt;ins class=&quot;adsbygoogle&quot; data-ad-client=&quot;ca-pub-1169387069605020&quot; data-ad-format=&quot;autorelaxed&quot; data-ad-slot=&quot;8759158081&quot; style=&quot;display: block;&quot;&gt;&lt;/ins&gt;&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
&quot;Penelitian ini dibangun berdasarkan penemuan yang dilakukan oleh tim kami di masa lalu untuk mengangkat virus SARS yang muncul pada 2002-2003,&quot; ujar Profesor Berend-Jan Bosch dari Utrecht University yang memimpin penelitian ini, seperti dilansir dari DailyMail, Jumat (8/5/2020).&lt;br /&gt;
&lt;br /&gt;
Penemuan ini telah dipublikasikan dalam Nature Communications. Penelitian ini masih perlu penelitian lebih lanjut untuk menemukan efektivitas dan dosis yang cocok untuk manusia.&lt;br /&gt;
&lt;br /&gt;
&quot;Masih banyak pekerjaan yang diperlukan untuk menilai apakah antibodi ini dapat melindungi atau mengurangi keparahan penyakit corona pada manusia,&quot; ujar Jingsong Wang, pendiri dan CEO Harbour BioMed.&lt;br /&gt;
&lt;br /&gt;
Antibodi Monoclonal telah merevolusi pengobatan kanker dengan obat-obatan seperti Keytruda dari Merck &amp;amp; Co dan Herceptin dari Roche Holding AG&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Source :&amp;nbsp;&lt;a href=&quot;https://www.cnbcindonesia.com/&quot;&gt;https://www.cnbcindonesia.com/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/5823052951952837075'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/5823052951952837075'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/05/belanda-temukan-antibodi-yang-mampu.html' title='Belanda Temukan Antibodi yang Mampu Tangkal Virus Corona!'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjWDz5Wlz_a13lkid7eaS29YC4AM69N9DfE97G2o8D2RAZKzhqWLgHMth7lGwT82cRsbEQGb95hZVq7u-_n7qb8Xyo_KumTrrVuZ2Ts9_6KWJle2Q_-HVUarBlR_LDXxxvtbh1_Ucb2LY/s72-c/covid19+enun+solutions+news.jpeg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-7703261974625914292</id><published>2020-05-03T21:23:00.000+07:00</published><updated>2020-11-27T21:02:34.202+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Belajar Babel Loader Javascript ES6</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031319583407bf63e74fd402a5583504377dfd8829.png&quot; height=&quot;290&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031319583407bf63e74fd402a5583504377dfd8829.png&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Apa itu&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel&lt;/em&gt;&amp;nbsp;atau&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel.js&lt;/em&gt;? Babel merupakan sebuah transpiler yang bertugas untuk mengubah sintaks JavaScript modern (ES6+) menjadi sintaks yang dapat didukung penuh oleh seluruh browser.&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;JavaScript merupakan bahasa pemrograman yang berkembang sangat pesat. Komunitasnya besar, dan tiap tahun selalu terdapat versi yang baru.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Namun perkembangan yang pesat tadi ternyata membutuhkan waktu yang lama untuk diadaptasi oleh browser atau Node.js. Lalu jika kita ingin mencoba sintaks terbaru di JavaScript apakah kita perlu menunggu hingga seluruh browser berhasil mengadaptasi pembaharuan tersebut? Tentu tidak!&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Dengan babel Anda dapat menuliskan sintaks JavaScript versi terbaru tanpa khawatir memikirkan dukungan pada browser. Karena babel akan mengubah sintaks yang kita tuliskan menjadi kode yang dapat diterima browser.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Jika Anda penasaran bagaimana cara babel bekerja, babel menyediakan sebuah playground yang dapat kita manfaatkan untuk mengubah sintaks JavaScript modern (ES6+) menjadi sintaks lama. Untuk mencobanya, silakan Anda buka tautan berikut:&amp;nbsp;&lt;a href=&quot;https://babeljs.io/repl&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://babeljs.io/repl&lt;/a&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313195932ff6b88f0352e20c9c08f27fd89aff700.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313195932ff6b88f0352e20c9c08f27fd89aff700.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Pada playground tersebut kita juga dapat memilih preset yang kita inginkan. Secara default preset akan mengarah ES2015 (ES6).&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Anda sudah tahu &amp;nbsp;sekilas mengenai babel. Nah pada webpack kita juga dapat menggunakan babel dalam bentuk loader.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Walaupun webpack secara standarnya dapat memproses berkas JavaScript tanpa perlu bantuan loader, namun proses tersebut tidak mengubah sintaks yang kita tuliskan.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Artinya jika kita menuliskan sintaks JavaScript modern, maka kita akan menemukannya juga pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031320001286d0cce40a7f1f8ac22836dcbab4867b.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031320001286d0cce40a7f1f8ac22836dcbab4867b.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Walaupun saat ini Google Chrome dan Mozilla Firefox sudah mendukung penulisan sintaks ES6, namun setidaknya kita perlu sedikit peduli terhadap dukungan browser lama seperti Internet Explorer atau browser versi lama lainnya.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;b&gt;Untuk menggunakan babel pada webpack sebagai loader, kita perlu memasang tiga package menggunakan npm pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;devDependencies&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;b&gt;Yang pertama package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;@babel/core&lt;/em&gt;, yang kedua&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;, dan yang ketiga&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;@babel/preset-env&lt;/em&gt;.&lt;/b&gt;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm install &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;@babel&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;core babel&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;loader &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;@babel&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;preset&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;env &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;b&gt;Package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;@babel/core&lt;/em&gt;&amp;nbsp;merupakan package inti yang harus dipasang ketika kita hendak menggunakan babel, baik pada webpack maupun tools yang lain.&lt;/b&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;&amp;nbsp;merupakan package yang diperlukan untuk menggunakan babel sebagai loader pada webpack.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Yang terakhir package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;@babel/preset-env&lt;/em&gt;&amp;nbsp;merupakan package preset yang akan kita gunakan untuk membantu&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;&amp;nbsp;dalam melakukan tugasnya.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;@babel/preset-env&lt;/em&gt;&amp;nbsp;merupakan preset cerdas yang memungkinkan kita menggunakan sintaks JavaScript terbaru tanpa menetapkan secara spesifik sintaks JavaScript versi apa yang kita gunakan.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;package.json&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan tampak seperti ini setelah memasang ketiga package tersebut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webclock&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;version&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;1.0.0&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;description&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;main&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;index.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;scripts&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;build&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;license&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;ISC&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;dependencies&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;jquery&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^3.4.1&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;moment&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^2.24.0&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;devDependencies&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;@babel/core&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^7.8.4&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;@babel/preset-env&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^7.8.4&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;babel-loader&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^8.0.6&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;css-loader&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^3.4.2&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style-loader&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^1.1.3&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^4.41.6&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack-cli&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^3.3.11&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Setelah berhasil memasang ketiga package tersebut, langkah selanjutnya kita dapat gunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;&amp;nbsp;dan preset-nya pada webpack configuration.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;path&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/index.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;dist&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;bundle.js&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;production&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rules&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* style and css loader */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;/\.css$/&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;css-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* babel loader */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;/\.js$/&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exclude&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;/node_modules/&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;babel-loader&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; options&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; presets&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;@babel/preset-env&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Ketika menerapkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;rule&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk berkas&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;.js&lt;/em&gt;&lt;/span&gt;, jangan lupa untuk menetapkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;exclude&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan nilai “&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;/node_modules/&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;”.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Apa artinya? Dengan menetapkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;exclude&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;itu berarti kita mengecualikan webpack untuk memproses berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang berada pada folder&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;“node_modules&lt;/em&gt;”.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Hal ini dapat meminimalisir proses yang tidak diperlukan, sehingga mempercepat proses build pada proyek kita. &amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Lalu pada penerapan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;&amp;nbsp;juga kita menggunakan properti&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;options&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;dengan menetapkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;presets&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di dalamnya. Pada properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;presets&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kita tetapkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;preset&lt;/em&gt;&amp;nbsp;(dalam bentuk array literas) yang sudah kita pasang menggunakan npm, yaitu&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;@babel/preset-env&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Setelah menggunakan babel loader pada webpack configuration, mari kita coba&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;build&lt;/em&gt;&amp;nbsp;dan buka kembali berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Maka kode yang kita tuliskan dalam ES6 akan diubah dalam sintaks yang dapat diterima oleh seluruh browser.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313200507f7a720e39de819c62a15f1be147aa62e.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313200507f7a720e39de819c62a15f1be147aa62e.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Bahkan pada berkas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle&lt;/em&gt;&amp;nbsp;tersebut dipastikan sudah tidak terdapat lagi sintaks yang dituliskan menggunakan ES6.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313200535f035aab9b99622b9e95be3f0d98fc827.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313200535f035aab9b99622b9e95be3f0d98fc827.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Namun walaupun sintaksnya sudah diubah, proyek akan tetap berjalan normal seperti biasanya.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Contoh:&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;https://github.com/dicodingacademy/a163-bfwd-labs/tree/207-webclock-webpack-using-loader&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/7703261974625914292'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/7703261974625914292'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/05/belajar-babel-loader-javascript-es6.html' title='Belajar Babel Loader Javascript ES6'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-5998612806319875483</id><published>2020-04-29T19:42:00.000+07:00</published><updated>2020-11-27T21:02:34.323+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Contoh Menggunakan API Dan Fetch di dalam Web Sederhana</title><content type='html'>&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Apakah Anda sudah berhasil menerapkan Fetch dalam menampilkan data dari API TheSportDB? Jika belum, yuk kita lakukan bersama-sama!&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Pada dokumentasi API menyebutkan bahwa, untuk mendapatkan daftar klub olahraga kita dapat menggunakan target url:&amp;nbsp;&lt;a href=&quot;https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=Arsenal&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=Arsenal&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031323502200000abb4fd3bf7637506d2872ff1cb0.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031323502200000abb4fd3bf7637506d2872ff1cb0.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Sebelum menuliskan langsung pada proyek dengan fetch, biasakan ketika hendak mengkonsumsi API biasakan untuk mencobanya menggunakan aplikasi Postman terlebih dahulu. Jika target url tersebut diakses melalui Postman dengan GET Request, maka akan menghasilkan response dengan struktur JSON yang tampak pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;tab Body&lt;/em&gt;.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132350321a588cd4b3f0285be6fd1af52fa3591e.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132350321a588cd4b3f0285be6fd1af52fa3591e.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Pada response JSON yang dihasilkan menampung satu&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;key&lt;/em&gt;&amp;nbsp;dengan nama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;teams&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang memiliki&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;value&lt;/em&gt;&amp;nbsp;berupa sebuah array. Di dalam array tersebut menampilkan banyak data terkait klub olahraga yang memiliki nama Arsenal. Kita dapat memanfaatkan key&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;strTeam&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk mendapatkan nama klub,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;strTeamBadge&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk mendapatkan logo klub, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;strDescriptionEN&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk mendapatkan deskripsi singkat dalam bahasa inggris.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Lantas untuk mencari data team berdasarkan kata kunci lain kita dapat mengubah kata&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;“Arsenal”&lt;/span&gt;&amp;nbsp;menggunakan kata kunci yang kita inginkan, misalnya&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;“Barcelona”&lt;/span&gt;. Sehingga melakukan request terhadap url:&amp;nbsp;&lt;a href=&quot;https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=Barcelona&quot; rel=&quot;noreferrer noopener&quot; style=&quot;box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=Barcelona&lt;/a&gt;&amp;nbsp;akan menghasilkan response JSON dengan informasi klub olahraga terkait&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;“Barcelona”&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313235048e7906db6f58df01a750d175c26f3b342.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313235048e7906db6f58df01a750d175c26f3b342.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Cukup mudah bukan untuk menggunakan API tersebut?&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Nah, Setelah memahami cara penggunaan API-nya, sekarang mari kita mulai tuliskan fungsi fetch pada proyek Club Finder. Langkah awal buka kembali proyek Club Finder pada text editor yang Anda gunakan.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132351017c49f82cb83c52af812adb0b076cc23f.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132351017c49f82cb83c52af812adb0b076cc23f.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Kemudian buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;data-source.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; script -&amp;gt; data -&amp;gt; data-source.js&lt;/em&gt;&lt;/span&gt;. Kita refactor fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;searchClub&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan menghapus seluruh logika yang ada di dalamnya, kemudian tuliskan fungsi fetch seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;searchClub&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;keyword&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=${keyword}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Seperti yang sudah kita ketahui, fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;fetch()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan mengembalikan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;promise resolve&lt;/em&gt;&amp;nbsp;jika request berhasil dilakukan. Maka untuk menangani respon dari request yang dibuat, kita gunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.then()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang di dalamnya berisi variabel&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;response&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sebagai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;response object&lt;/em&gt;&amp;nbsp;yang didapat.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;searchClub&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;keyword&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=${keyword}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;response &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Kemudian di dalam blok&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;then&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tersebut, kita ubah nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;response&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi JSON dengan memanggil method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;response.json()&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;searchClub&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;keyword&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=${keyword}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;response &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;response&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Karena method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;response.json()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;juga mengembalikan nilai promise, maka untuk mendapatkan nilai yang dibawa oleh resolve kita perlu menambahkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.then&lt;/em&gt;&lt;/span&gt;&amp;nbsp;lainnya (chaining promise). Di dalam&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.then&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang kedua ini, berikan parameter dengan nama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;responseJson&lt;/em&gt;&lt;/span&gt;&amp;nbsp;(penamaan variabel tidaklah baku, namun gunakan penamaan yang menunjukkan arti dari nilai variabelnya).&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;searchClub&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;keyword&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=${keyword}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;response &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;response&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;responseJson&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan nilai JSON yang dihasilkan dari perubahan object response dalam bentuk JSON melalui method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.json()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tadi.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Di dalam block&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.then&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang kedua, kita kembalikan (&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;return&lt;/em&gt;&lt;/span&gt;) dengan nilai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;promise resolve&lt;/em&gt;&amp;nbsp;dengan membawa nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;jsonResponse.teams&amp;nbsp;&lt;/em&gt;jika nilai array tidak&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;null&lt;/em&gt;&lt;/span&gt;. Namun jika teams bernilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;null&lt;/em&gt;&lt;/span&gt;, maka kembalikan dengan nilai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;promise reject&lt;/em&gt;&amp;nbsp;dengan membawa nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;“${keyword} is not found”&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;searchClub&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;keyword&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=${keyword}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;response &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;response&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;teams&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;teams&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Promise&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;reject&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`${keyword}&amp;nbsp;is not found`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Simpan perubahan tersebut dan jalankan aplikasi dalam mode development menggunakan perintah:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm run start&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Setelah proyek terbuka, lakukan pencarian dengan keyword apapun yang Anda mau, di sini kita contohkan dengan “Barcelona”.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313235133e90126ea84a6df29dc44b91c4f296331.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313235133e90126ea84a6df29dc44b91c4f296331.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Yah, data yang ditampilkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;undefined&lt;/em&gt;&lt;/span&gt;. Mengapa bisa demikian? Ini disebabkan karena kita belum menyesuaikan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;key&lt;/em&gt;&amp;nbsp;berdasarkan response yang didapat dari public API. Kita harus menggunakan key&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;strTeam&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk mendapatkan nama klub,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;strTeamBadge&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk mendapatkan logo klub, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;strDescriptionEN&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk mendapatkan deskripsi singkat dalam bahasa inggris.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Ketiga&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;key&lt;/em&gt;&amp;nbsp;tersebut kita tetapkan pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; script -&amp;gt; component -&amp;gt; club-item.js&lt;/em&gt;&lt;/span&gt;. Lebih tepatnya pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;render&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ……..&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img class=&quot;fan-art-club&quot; src=&quot;${this._club.fanArt}&quot; alt=&quot;Fan Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${this._club.name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${this._club.description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Kita ubah properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;this._club.fanArt&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;this._club.strTeamBadge&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;this._club.name&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;this._club.strTeam&lt;/em&gt;&lt;/span&gt;, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;this._club.description&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;this._club.strDescriptionEN&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Sehingga fungsi render akan menjadi seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin: 0;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;padding: 0;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;box-sizing: border-box;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:host {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display: block;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin-bottom: 18px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;border-radius: 10px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;overflow: hidden;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.fan-art-club {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width: 100%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;max-height: 300px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;object-fit: cover;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;object-position: center;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.club-info {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;padding: 24px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.club-info &amp;gt; h2 {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-weight: lighter;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.club-info &amp;gt; p {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin-top: 10px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;overflow: hidden;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;text-overflow: ellipsis;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display: -webkit-box;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-box-orient: vertical;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-line-clamp: 10; /* number of lines to show */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img class=&quot;fan-art-club&quot; src=&quot;${this._club.strTeamBadge}&quot; alt=&quot;Fan Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${this._club.strTeam}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${this._club.strDescriptionEN}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Simpan kembali perubahan kode yang dituliskan kemudian lakukan pencarian kembali pada aplikasi Club Finder. Seharusnya sekarang aplikasi sudah bisa menampilkan data dengan baik.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132351502bc06712f0552fa6f26e8f8de5607033.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132351502bc06712f0552fa6f26e8f8de5607033.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Voila!&lt;/em&gt;&amp;nbsp;Anda sudah berhasil menerapkan Fetch pada proyek Club Finder.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem; text-align: center;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;https://github.com/dicodingacademy/a163-bfwd-labs/tree/112-club-finder-fetch-solution&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Contoh Hasil Akhirnya bisa di klik disini&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/5998612806319875483'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/5998612806319875483'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/contoh-menggunakan-api-dan-fetch-di.html' title='Contoh Menggunakan API Dan Fetch di dalam Web Sederhana'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-9095955922354793784</id><published>2020-04-29T18:39:00.000+07:00</published><updated>2020-11-27T21:02:34.394+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Contoh Ajax Menggunakan Fetch</title><content type='html'>&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Seperti yang sudah kita ketahui, fetch memanfaatkan promise dalam melakukan tugasnya, sehingga network request yang dibuat menggunakan fetch akan selalu berjalan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;asynchronous&lt;/em&gt;.&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Penggunaan dasar dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;fetch&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tampak seperti ini:&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313194951a9ddbc715b419aa9f5c19cfd5cb5ffae.png&quot; class=&quot;fr-fic fr-dii&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313194951a9ddbc715b419aa9f5c19cfd5cb5ffae.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: inline-block; float: none; margin-left: 5px; margin-right: 5px; max-width: calc(100% - 10px); position: relative; vertical-align: bottom; width: 500px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Network request dilakukan pada saat fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;fetch()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tereksekusi.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika request berhasil diproses oleh server, fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;fetch()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan mengembalikan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;promise resolve&lt;/em&gt;&amp;nbsp;dan membawa&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;response&lt;/em&gt;&lt;/span&gt;&amp;nbsp;object di dalamnya. Namun nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;response&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang dibawa&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;resolve&lt;/em&gt;&amp;nbsp;belum sebagai data JSON yang kita butuhkan, melainkan informasi mengenai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;response&lt;/em&gt;&amp;nbsp;itu sendiri, seperti&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;status code&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;target url&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;headers&lt;/em&gt;, dsb. Maka dari itu, untuk mendapatkan data JSON yang dibutuhkan, kita perlu mengubah response object ke dalam bentuk JSON dengan memanggil method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.json()&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;response &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;response&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.json()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;juga mengembalikan nilai Promise, sehingga kita membutuhkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;chaining promise&lt;/em&gt;&amp;nbsp;dengan menambahkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.then()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk mendapatkan data JSON yang sesungguhnya.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;response &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;response&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu jangan lupa juga untuk menambahkan block&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;catch()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada akhir&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;chaining promise&lt;/em&gt;&amp;nbsp;untuk menangani apabila&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;rejected promise&lt;/em&gt;&amp;nbsp;terjadi baik karena fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;fetch()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;atau&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;json()&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;response &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;response&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;error &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Karena fetch memanfaatkan promise, kita bisa memanfaatkan async/await jika Anda lebih suka dengan gaya penulisan synchronous.&lt;/div&gt;&lt;div class=&quot;panel panel-default panel-code&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7365?from=7358#tab1-code2&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;Promise&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code2&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;response &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;response&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;error &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7365?from=7358#tab1-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;async/await&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;getBooks&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;response &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;await&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;responseJson &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;await&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;response&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;json&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseJson&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;getBooks&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Advanced Fetch Usage&lt;/h3&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;fetch()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dapat menerima dua buah parameter di dalamnya. Selain menetapkan target URL, kita juga dapat memberikan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;options&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk menetapkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;method&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;header&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;body&lt;/em&gt;&lt;/span&gt;, dsb pada request yang akan dijalankan. Namun penerapan options ini bersifat pilihan. Tidak wajib.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031320004200d4bfb205c4a5469bb6063092d38d30.png&quot; class=&quot;fr-fic fr-dii&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031320004200d4bfb205c4a5469bb6063092d38d30.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: inline-block; float: none; margin-left: 5px; margin-right: 5px; max-width: calc(100% - 10px); position: relative; vertical-align: bottom; width: 500px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Penggunaan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;fetch()&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tanpa menerapkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;options&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan membuat GET request sederhana yang ditujukkan pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;targetUrl&lt;/em&gt;&lt;/span&gt;. Hal tersebut sama seperti yang sudah kita lakukan sebelumnya. Lantas kapan kita perlu menerapkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;options&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada penggunaan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;fetch&lt;/em&gt;&lt;/span&gt;? Berikut beberapa kasus saat kita memerlukannya.&lt;/div&gt;&lt;h4 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.5rem !important; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Changing Request Method&lt;/h4&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk membuat POST request ataupun method request lainnya kita perlu menerapkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;options&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;method&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di dalamnya.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/add&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;method&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;POST&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Nilai dari properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;method&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dituliskan dalam bentuk string, contohnya&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;“POST”&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;“PUT”&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;“DELETE”&lt;/span&gt;, dsb. Nilai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;default&lt;/em&gt;&amp;nbsp;dari properti ini adalah “GET”, sehingga jika kita membuat GET Request, kita tidak perlu menetapkan nilai method secara eksplisit.&lt;/div&gt;&lt;h4 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.5rem !important; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Set Header Property&lt;/h4&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk menambahkan request header dengan fetch kita gunakan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;headers&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;options&lt;/em&gt;&lt;/span&gt;. Contohnya, untuk menambahkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Content-Type&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;application/json&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada headers kita dapat melakukannya dengan seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/add&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;method&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;POST&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;headers&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Content-Type&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;application/json&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Tentu kita juga dapat menetapkan lebih dari satu properti pada headers. Contohnya kita tambahkan lagi properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;X-Auth-Token&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;12345.&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/add&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;method&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;POST&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;headers&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Content-Type&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;application/json&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;X-Auth-Token&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;12345&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;h4 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.5rem !important; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Set Data to Body Request&lt;/h4&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk mengirimkan data pada body request kita gunakan properti body pada options, contohnya seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fetch&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/add&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;method&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;POST&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;headers&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Content-Type&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;application/json&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;X-Auth-Token&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;12345&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;body&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;JSON&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;stringify&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;title&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Edensor&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;author&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Andrea Hirata&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sama seperti XHR, data yang dikirimkan melalui body request perlu diubah menjadi JSON String terlebih dahulu.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; JSON&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;stringify&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;title&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Edensor&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;author&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Andrea Hirata&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Contoh kode di atas dapat Anda temukan pada tautan berikut&amp;nbsp;&lt;a href=&quot;https://repl.it/@dicodingacademy/163-06-AJAX-Fetch-Advanced?lite=true&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://repl.it/@dicodingacademy/163-06-AJAX-Fetch-Advanced?lite=true&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Anda bisa coba lakukan POST Request menggunakan Fetch dengan menjalankan potongan kode tersebut.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/9095955922354793784'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/9095955922354793784'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/contoh-ajax-menggunakan-fetch.html' title='Contoh Ajax Menggunakan Fetch'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-2636690001198742616</id><published>2020-04-29T02:58:00.000+07:00</published><updated>2020-11-27T21:02:34.460+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Contoh Dasar Ajax Menggunakan XMLHttpRequest</title><content type='html'>&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;XMLHttpRequest&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;atau&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;XHR&lt;/span&gt;&amp;nbsp;merupakan objek yang tersedia pada browser yang digunakan untuk membuat HTTP Requests menggunakan JavaScript. Karena namanya kita mungkin beranggapan bahwa XHR hanya mendukung format data XML, tetapi nyatanya saat ini XHR dapat digunakan oleh banyak format, bukan hanya XML.&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Walaupun sekarang terdapat cara yang lebih modern yaitu menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;fetch&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, namun masih ada kok beberapa developer yang menggunakan XHR dalam melakukan HTTP Request. Alasannya karena alasan dukungan browser tua atau suatu fitur yang tidak bisa fetch lakukan seperti&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;tracking upload progress&lt;/em&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Basic Usage&lt;/h3&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dapat berjalan secara&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;synchronous&lt;/em&gt;&amp;nbsp;maupun&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;asynchronous&lt;/em&gt;. Namun kebanyakan kasus HTTP Request sebaiknya asynchronous.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Contoh penggunaan dasar dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;adalah seperti ini:&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132318522fefb326486e99f9449b3ea0b5d8cb31.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132318522fefb326486e99f9449b3ea0b5d8cb31.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Langkah awal untuk menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;adalah dengan membuat instance baru dari objek&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; xhr &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu pada instance dari objek tersebut (&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;xhr&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;) kita tentukan callback function ketika request berhasil (&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;onload&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;) dan ketika request gagal (&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;onerror&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;).&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onload &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;    console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseText&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onerror &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;    console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ups something error&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Di dalam&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;callback function&lt;/em&gt;&amp;nbsp;tersebut, nilai dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan XHR objek. Sehingga&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.responseText&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan memiliki nilai response (dalam bentuk text) dari server. Ingat karena pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;callback function&lt;/em&gt;&amp;nbsp;tersebut nilai this merupakan XHR objek, kita tidak dapat menggunakan gaya arrow function dalam menuliskan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;callback function&lt;/em&gt;-nya.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onload &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// akan menyebabkan error, karena arrow function tidak memiliki this.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseText&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Selanjutnya kita tentukan HTTP Method dan URL yang dituju dengan menggunakan method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;.open()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;GET&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://api-to-call.com/endpoint&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Nah, langkah akhir adalah mengirimkan request yang sudah kita konfigurasi di atas menggunakan method .&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;send()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sehingga seluruh kode dalam penggunaan dasar dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan contoh target url berikut&amp;nbsp;&lt;a href=&quot;https://web-server-book-dicoding.appspot.com/list&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://web-server-book-dicoding.appspot.com/list&lt;/a&gt;&amp;nbsp;adalah seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; xhr &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onload &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseText&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onerror &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ups something error&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;GET&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Coba Anda&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;copy&lt;/em&gt;&amp;nbsp;dan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;paste&lt;/em&gt;&amp;nbsp;kode di atas dan jalankan pada console devTools. Jika request berhasil, Anda akan mendapatkan data dalam bentuk JSON String. Data tersebut bisa Anda olah menjadi JavaScript objek dengan mengubahnya menggunakan method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;JSON.parse()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseText&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;span style=&quot;background-color: white; color: #3d3d3d; font-family: &amp;quot;quicksand&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;Anda juga bisa mencoba menjalankan potongan kode di atas pada repl.it melalui tautan berikut:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;https://repl.it/@dicodingacademy/163-06-AJAX-XHR-basic?lite=true&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: white; box-sizing: border-box; color: rgb(255, 84, 131) !important; font-family: Quicksand, sans-serif; font-size: 16px; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://repl.it/@dicodingacademy/163-06-AJAX-XHR-basic?lite=true&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Header and Body Request using XHR&lt;/h3&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sebelumnya kita sudah belajar bagaimana cara menggunakan dasar&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dalam membuat sebuah GET Request. Lalu bagaimana jika kita ingin menggunakan method POST dan menetapkan properti pada Header ? Lalu bagaimana cara mengirimkan data pada body HTTP Request? Yuk kita bahas permasalahan tersebut satu per satu.&lt;/div&gt;&lt;h4 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.5rem !important; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Set Header Property&lt;/h4&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dalam menggunakan Web API tidak selamanya kita hanya menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;GET&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;request saja, terutama ketika request yang kita inginkan bertujuan mengubah atau menambahkan data. Web API biasanya meminta kita untuk melakukannya dengan method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;POST&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;atau&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;PUT&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Tak jarang juga Web API meminta kita untuk menetapkan properti tertentu pada request header untuk menunjukkan credential yang kita miliki. Request tersebut sudah pernah kita coba ya menggunakan Postman. Tapi bagaimana ya caranya jika menggunakan XHR?&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk menetapkan properti pada request header, Anda dapat gunakan method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;setRequestHeader()&lt;/span&gt;&amp;nbsp;&lt;/em&gt;&lt;/span&gt;pada instance&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;XMLHttpRequest&lt;/span&gt;&amp;nbsp;&lt;/em&gt;&lt;/span&gt;setelah menetapkan method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;.open()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Method tersebut menerima dua parameter. Parameter pertama merupakan nama properti dan parameter yang kedua adalah nilai yang akan ditetapkan pada properti tersebut. Sehingga untuk menetapkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Content-Type&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;application/json&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada request kita dapat melakukannya dengan cara:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; xhr &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onload &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseText&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onerror &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ups something error&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;POST&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/add&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// menambahkan properti pada header request&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;setRequestHeader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Content-Type&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;application/json&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita dapat menetapkan properti pada request header sebanyak yang kita perlukan&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; xhr &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onload &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseText&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onerror &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ups something error&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;POST&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/add&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// menambahkan properti pada header request&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;setRequestHeader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Content-Type&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;application/json&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;setRequestHeader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;X-Auth-Token&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;12345&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Cukup mudah bukan?&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h4 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.5rem !important; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Set Data to Body Request&lt;/h4&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu untuk menetapkan data pada body request, lakukanlah pada method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;.send()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dari instance&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Contohnya untuk mengirimkan data JSON String pada body request, begini caranya:&amp;nbsp;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; xhr &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;XMLHttpRequest&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onload &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;responseText&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;onerror &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ups something error&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;open&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;POST&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://web-server-book-dicoding.appspot.com/add&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// menambahkan properti pada header request&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;setRequestHeader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Content-Type&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;application/json&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;setRequestHeader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;X-Auth-Token&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;12345&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;book &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;title&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Edensor&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;author&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Andrea Hirata&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;xhr&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;JSON&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;stringify&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;));&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sebenarnya tidak hanya JSON format yang dapat dikirimkan melalui body, pada&amp;nbsp;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot;&gt;situs MDN&lt;/a&gt;&amp;nbsp;menyebutkan bahwa kita dapat mengirimkan dokumen yang sudah ter-&lt;em style=&quot;box-sizing: border-box;&quot;&gt;serialized&amp;nbsp;&lt;/em&gt;sebelum dikirim, atau data lain yang terdaftar pada&amp;nbsp;&lt;a href=&quot;https://fetch.spec.whatwg.org/#bodyinit&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;Fetch spec&lt;/i&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;seperti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;Blob&lt;/i&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;BufferSource&lt;/i&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;FormData&lt;/i&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;URLSeachParam&lt;/i&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;ReadableStream&lt;/i&gt;&lt;/span&gt;&amp;nbsp;atau&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;USVString&lt;/i&gt;&lt;/span&gt;&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;object&lt;/em&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Contoh kode di atas dapat Anda temukan pada tautan berikut&amp;nbsp;&lt;a href=&quot;https://repl.it/@dicodingacademy/163-06-AJAX-XHR-Header-and-Body?lite=true&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://repl.it/@dicodingacademy/163-06-AJAX-XHR-Header-and-Body?lite=true&lt;/a&gt;. Anda bisa coba lakukan POST Request dengan menjalankan potongan kode tersebut&lt;/div&gt;Hasil Akhir Cek :&lt;br /&gt;&lt;a href=&quot;https://github.com/dicodingacademy/a163-bfwd-labs/tree/302-dicoding-books-xhr&quot;&gt;https://github.com/dicodingacademy/a163-bfwd-labs/tree/302-dicoding-books-xhr&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/2636690001198742616'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/2636690001198742616'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/contoh-dasar-ajax-menggunakan.html' title='Contoh Dasar Ajax Menggunakan XMLHttpRequest'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-4394484226361381003</id><published>2020-04-29T02:20:00.000+07:00</published><updated>2020-11-27T21:02:34.527+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Apa Itu JSON?</title><content type='html'>&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah kita mengetahui apa itu Web API dan cara pengujiannya menggunakan Postman, sekarang saatnya kita mempelajari suatu format yang biasa digunakan dalam transaksi data menggunakan Web API, yaitu JSON.&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jauh pada materi sebelumnya, atau jika Anda sudah mengikuti kelas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Belajar Dasar Pemrograman Web&lt;/em&gt;, &amp;nbsp;tentunya Anda sudah mengenal dan menggunakan JSON bukan? Pada materi kali ini kita akan membahas JSON lebih detail lagi.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;JSON sendiri adalah singkatan dari JavaScript Object Notation. JSON merupakan format yang sering digunakan dalam pertukaran data. Saat ini JSON banyak diandalkan karena formatnya berbasis teks dan relatif mudah dibaca.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Bukan hanya JavaScript, walaupun memiliki nama JavaScript Object Notation, format JSON ini dapat digunakan oleh hampir semua bahasa pemrograman yang ada. Jika Anda belajar fundamental dalam membangun aplikasi Android pada kelas Dicoding, baik menggunakan Kotlin ataupun Java, Anda akan berhadapan dengan JSON untuk transaksi datanya.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu seperti apa sebenarnya rupa JSON ini? Struktur JSON dapat terbentuk dari 2 (dua) literal data, yakni objek dan array.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;error&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;message&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;success&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;books&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;     &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;         &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;         &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Laskar Pelangi&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;         &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Andrea Hirata&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;     &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;     &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;         &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;         &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Filosofi Kopi&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;         &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Dewi Lestari&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;     &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;     &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;         &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;         &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Clean Code&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;         &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Robert C Martin&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;    &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Data yang merupakan objek pada JSON selalu diawali dengan tanda&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;{&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;(buka kurung kurawal) &amp;nbsp;dan diakhiri dengan tanda tutup kurung kurawal&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;}&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;&lt;/em&gt;(tutup kurung kurawal). Sedangkan array pada JSON selalu diawali dengan tanda&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;[&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;(buka kurung siku) dan diakhiri dengan tanda&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;]&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;(tutup kurung siku).&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313225902ae266e132fb41907aef8dbcd4201c57c.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313225902ae266e132fb41907aef8dbcd4201c57c.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Struktur dari JSON juga menggunakan format&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;key: value&lt;/em&gt;&amp;nbsp;untuk menampilkan datanya. Contoh di atas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;“&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;error&lt;/span&gt;”&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;key&lt;/em&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;false&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;value&lt;/em&gt;. Penulisan JSON hampir identik dengan JavaScript objek. Namun&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;key&lt;/em&gt;&amp;nbsp;pada JSON selalu dituliskan di dalam tanda “ “ (kutip dua).&lt;/div&gt;&lt;div class=&quot;panel panel-default panel-code&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link active show&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7295?from=7288#tab1-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;JSON&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;false&quot; class=&quot;nav-link show&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7295?from=7288#tab1-code2&quot; role=&quot;tab&quot; style=&quot;background-color: transparent; border-radius: 0.25rem; box-sizing: border-box; color: rgb(48, 48, 48) !important; display: block; padding: 0.5rem; text-decoration-line: none;&quot;&gt;JavaScript&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;message&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;success&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada JSON&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;value&lt;/em&gt;&amp;nbsp;kita dapat menetapkan nilai dengan berbagai tipe data, di antaranya:&lt;/div&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;String&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Number&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Object&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Array&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Boolean&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;Null&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h3 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Using JSON in JavaScript&lt;/h3&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah mengenal rupa, struktur dan penulisan JSON, selanjutnya bagaimana cara menggunakan JSON pada JavaScript? Sama seperti menggunakan objek JavaScript biasa!&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; data &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;error&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;message&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;success&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;books&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Laskar Pelangi&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Andrea Hirata&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Filosofi Kopi&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Dewi Lestari&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Clean Code&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Robert C Martin&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Error?&amp;nbsp;${data.error}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Daftar Buku: &quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;books&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; index&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`${index + 1}. ${book.title} (${book.author})`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Error? false&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Daftar Buku:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;1. Laskar Pelangi (Andrea Hirata)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;2. Filosofi Kopi (Dewi Lestari)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;3. Clean Code (Robert C Martin)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita bisa mengakses data JSON objek menggunakan tanda titik setelah variabel yang menampungnya. Contoh cara mengakses data dengan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;key&lt;/em&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;books&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;seperti:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;books&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun jika&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;key&lt;/em&gt;&amp;nbsp;terdiri dari karakter yang tidak dapat digunakan dalam penamaan variabel seperti&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;white space&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;dash&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;slash&lt;/em&gt;&amp;nbsp;atau yang lainnya, datanya dapat kita askes melalui&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;indexing&lt;/em&gt;&amp;nbsp;seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; data &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;....,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;book list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;......&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;book list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; index&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`${index +&amp;nbsp;1}.&amp;nbsp;${book.title}&amp;nbsp;(${book.author})`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Daftar Buku:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;1. Laskar Pelangi (Andrea Hirata)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;2. Filosofi Kopi (Dewi Lestari)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;3. Clean Code (Robert C Martin)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Seperti yang sudah kita ketahui, JSON ini biasanya digunakan untuk transaksi data ke/dari web server. Ketika transaksi data berlangsung, data tersebut selalu dalam bentuk string.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;span class=&quot;fr-img-caption fr-fic fr-dib&quot; style=&quot;box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; text-align: center; vertical-align: top; width: 723px;&quot;&gt;&lt;span class=&quot;fr-img-wrap&quot; style=&quot;box-sizing: border-box; display: inline-block; margin: auto; padding: 0px; width: 723px;&quot;&gt;&lt;img alt=&quot;20200313230409c9fc8c2540e6f3f5d173d016dba073e3.png&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313230409c9fc8c2540e6f3f5d173d016dba073e3.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; margin: auto; max-width: 100%; position: relative; vertical-align: middle; width: 723px;&quot; /&gt;&lt;span class=&quot;fr-inner&quot; style=&quot;box-sizing: border-box; display: block; font-size: 14px; font-weight: initial; margin: auto; opacity: 0.9; padding: 5px 5px 10px; width: 723px;&quot;&gt;Contoh JSON yang dihasilkan oleh Web Server&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Nah untuk mengelola data JSON dalam bentuk string pada JavaScript, kita perlu melakukan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;parse&lt;/em&gt;&amp;nbsp;dengan menggunakan global object&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;JSON&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Terdapat dua method penting dalam global object JSON, yang pertama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;parse()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan yang kedua&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;stringify()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;JSON.parse()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;digunakan untuk mengubah JSON dalam bentuk String menjadi objek JavaScript. Contohnya seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; jsonString &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp;&quot;error&quot;: false,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp;&quot;message&quot;: &quot;success&quot;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp;&quot;books&quot;: [&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;id&quot;: 1,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;title&quot;: &quot;Laskar Pelangi&quot;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;author&quot;: &quot;Andrea Hirata&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;id&quot;: 2,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;title&quot;: &quot;Filosofi Kopi&quot;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;author&quot;: &quot;Dewi Lestari&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;id&quot;: 3,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;title&quot;: &quot;Clean Code&quot;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;author&quot;: &quot;Robert C Martin&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;data &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;JSON&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;jsonString&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;books&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;book&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; index&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`${index +&amp;nbsp;1}.&amp;nbsp;${book.title}&amp;nbsp;(${book.author})`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Daftar Buku:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;1. Laskar Pelangi (Andrea Hirata)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;2. Filosofi Kopi (Dewi Lestari)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;3. Clean Code (Robert C Martin)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;JSON.stringify()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;memiliki fungsi sebaliknya. Yaitu mengubah JavaScript objek dalam bentuk JSON string. Contohnya seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; data &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;error&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;success&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;books&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Laskar Pelangi&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Andrea Hirata&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Filosofi Kopi&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Dewi Lestari&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;title&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Clean Code&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Robert C Martin&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;jsonString &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;JSON&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;stringify&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;jsonString&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;{&quot;error&quot;:false,&quot;message&quot;:&quot;success&quot;,&quot;books&quot;:[{&quot;id&quot;:1,&quot;title&quot;:&quot;Laskar Pelangi&quot;,&quot;author&quot;:&quot;Andrea Hirata&quot;},{&quot;id&quot;:2,&quot;title&quot;:&quot;Filosofi Kopi&quot;,&quot;author&quot;:&quot;Dewi Lestari&quot;},{&quot;id&quot;:3,&quot;title&quot;:&quot;Clean Code&quot;,&quot;author&quot;:&quot;Robert C Martin&quot;}]}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/4394484226361381003'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/4394484226361381003'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/apa-itu-json.html' title='Apa Itu JSON?'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-3571832215960958171</id><published>2020-04-29T02:19:00.000+07:00</published><updated>2020-11-27T21:02:34.592+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="aplikasi web"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Apa itu Web API?</title><content type='html'>&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Web APIs&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada pengenalan modul ini kita sudah paham bagaimana AJAX dapat menampilkan informasi yang dinamis pada aplikasi kita. Namun kita belum mengetahui dari mana sumber data tersebut berasal? Bagaimana cara mengaksesnya? Untuk menjawab itu semua, mari berkenalan dengan Web API.&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Web API (Application Programming Interface) merupakan interface yang disediakan oleh penyedia data agar data yang ia miliki dapat dimanfaatkan dengan mudah pada banyak aplikasi, baik itu aplikasi web, mobile, desktop ataupun lainnya.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Penyedia data yang telah membangun Web API memiliki keuntungan karena proses pengembangan aplikasi menjadi lebih efisien. Mengapa? Karena cukup dengan satu Web API, data dapat dikonsumsi pada berbagai macam platform seperti yang sudah disebutkan di atas.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031322462248e1afa1ef73e3da2e43e6f7bcfb5c7a.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031322462248e1afa1ef73e3da2e43e6f7bcfb5c7a.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada ilustrasi di atas, Web API bekerja menggunakan salah satu pola standar yaitu REST (Representational State Transfer). Pola inilah yang saat ini banyak digunakan karena simpel dan mudah dipelajari daripada pola yang lainnya. Jenis data yang diterima atau dikirimkan pada pola REST dapat berupa format text, JSON atau XML.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pola REST hampir sepenuhnya menggunakan HTTP dalam transaksi datanya. Sehingga untuk berkomunikasi dengan Web API ini, client (aplikasi) harus membuat HTTP request pada endpoint (URL) yang telah ditentukkan. Biasanya penyedia data juga menetapkan HTTP Request Method yang berbeda pada setiap endpoint-nya.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Terdapat banyak tipe/method dalam melakukan HTTP Request, namun terdapat 4 (empat) method penting yang biasanya digunakan pada Web API dalam melakukan transaksi data.&lt;/div&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;GET&lt;/i&gt;&lt;/span&gt;&amp;nbsp;: Digunakan untuk mengambil informasi dari Web API.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;POST&lt;/i&gt;&lt;/span&gt;&amp;nbsp;: Digunakan untuk menambahkan data.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;PUT&lt;/i&gt;&lt;/span&gt;&amp;nbsp;: Digunakan untuk mengubah data.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;i style=&quot;box-sizing: border-box;&quot;&gt;DELETE&lt;/i&gt;&lt;/span&gt;&amp;nbsp;: Digunakan untuk menghapus data.&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah client membuat HTTP request pada Web API, maka Web API akan mengembalikan HTTP response. Pada response terdapat status kode yang menunjukkan apakah request yang kita lakukan berhasil atau gagal. Berikut beberapa status kode yang dapat dihasilkan dari HTTP Response pada Web API.&lt;/div&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;200&lt;/span&gt;&amp;nbsp;(&lt;em style=&quot;box-sizing: border-box;&quot;&gt;OK&lt;/em&gt;) : Request berhasil dipenuhi oleh server (Web API).&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;400&lt;/span&gt;&amp;nbsp;(&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Bad Request&lt;/em&gt;) : Server tidak mengerti request yang dikirimkan client.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;401&lt;/span&gt;&amp;nbsp;(&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Unauthorized&lt;/em&gt;) : Request membutuhkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;authorization&lt;/em&gt;.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;403&lt;/span&gt;&amp;nbsp;(&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Forbidden&lt;/em&gt;) : Server mengerti request dari client namun menolak untuk memprosesnya karena request tersebut tidak boleh dilakukan.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;404&lt;/span&gt;&amp;nbsp;(&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Not Found&lt;/em&gt;) : Resource yang client minta, tidak ditemukan.&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;500&lt;/span&gt;&amp;nbsp;(Server Error) : Server mengalami kendala untuk memproses request.&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Banyak penyedia data yang menyediakan Web API secara cuma-cuma atau dapat dikonsumsi umum. Namun ada juga penyedia data yang membangun Web API yang hanya digunakan untuk keperluan internal saja. Biasanya jika kita mengakses Web API yang sifatnya private, kita akan terhalangi oleh&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;CORS&lt;/span&gt;&amp;nbsp;(&lt;em style=&quot;box-sizing: border-box;&quot;&gt;cross-origin resource sharing&lt;/em&gt;&lt;/div&gt;&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;CORS&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sebelum kita mencoba langkah-langkah mengakses Web API, ada hal yang harus kita ketahui terlebih dahulu perihal keamanan. Dalam transaksi menggunakan Web API menggunakan AJAX kita dapat melihat request yang dibuat dan response yang dihasilkan melalui Network tabs pada DevTools.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313224809099128c193bbc451d3759397de0d6025.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313224809099128c193bbc451d3759397de0d6025.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Hal tersebut disebabkan AJAX diproses pada sisi client sehingga pengguna dapat leluasa untuk melihat dan mengontrolnya. Maka dengan alasan keamanan ketika kita melakukan AJAX baik menggunakan dengan XHR atau Fetch, kita hanya diperbolehkan melakukan request dari domain yang sama.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Contoh jika kita ingin mengakses API yang bersumber dari google.com/api maka kita sebagai client perlu menjadi google.com. Jika kita berasal dari domain yang berbeda, contohnya bing.com maka kita tidak dapat menggunakan AJAX pada google.com/api. Hal ini dikenal sebagai&amp;nbsp;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;same-origin policy&lt;/em&gt;&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;/em&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun jika memang Web API tersebut diperbolehkan untuk dikonsumsi umum berarti penyedia data harus menerapkan teknologi yang dinamakan CORS (Cross-Origin Resource Sharing) pada server-nya.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Server yang menyediakan Web API menggunakan CORS dapat digunakan secara umum dan mengelakkan kebijakan same-origin guna mengakses informasi yang ada di dalamnya&lt;/div&gt;&lt;h2 style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Test a Web API using Postman&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Apa yang perlu Anda lakukan sebelum mencoba Web API menggunakan AJAX? Untuk mempelajari atau menguji sebuah Web API, developer menggunakan tools yang bernama Postman. Postman adalah GUI&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;API Caller&lt;/em&gt;&amp;nbsp;yang dapat membuat HTTP Request dengan method yang lengkap seperti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;GET&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;POST&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;PUT&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;DELETE&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan lainnya.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Postman merupakan tools yang sangat cocok untuk menguji sebuah Web API karena terdapat fungsi yang relatif lengkap sebagai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;API caller&lt;/em&gt;&amp;nbsp;dalam melakukan HTTP Request. Pada Postman kita dapat menetapkan parameter dan mengirimkan data pada body atau header request dengan mudah, tanpa memerlukan kode.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Postman tersedia secara gratis dan dapat berjalan pada sistem operasi Windows, Linux maupun MacOS. Untuk mendapatkan aplikasi Postman, kita bisa mengunduhnya melalui&amp;nbsp;&lt;a href=&quot;https://www.postman.com/&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot;&gt;https://www.postman.com&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132250278ee3046b28571ea08248c18a8e7417bf.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132250278ee3046b28571ea08248c18a8e7417bf.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah mengunduhnya, silakan Anda pasang aplikasi postman pada komputer. Saat &amp;nbsp;selesai Anda bisa langsung membukanya.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031322505168bdc63b88a0a8016d0fa0f2e4aa6520.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031322505168bdc63b88a0a8016d0fa0f2e4aa6520.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Ketika pertama kali membuka aplikasi Postman, kita perlu login atau registrasi untuk memiliki akun. Setelah berhasil&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;login&lt;/em&gt;, berikut tampilan pada halaman utamanya:&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313225118a91df05b0a17ef9fc809985aa27a71b6.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313225118a91df05b0a17ef9fc809985aa27a71b6.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk melakukan sebuah HTTP Request kita dapat memilih menu “create a request” yang tersedia pada halaman tersebut.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313225142ca222609d25b934d654c583a6ad2bdae.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313225142ca222609d25b934d654c583a6ad2bdae.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian untuk mengirimkan request kita tentukan dulu endpoint (request URL) mana yang akan kita tuju pada kolom yang sudah tersedia. Kita akan mencoba melakukan request pada Web API dengan endpoint berikut:&amp;nbsp;&lt;a href=&quot;https://web-server-book-dicoding.appspot.com/list&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://web-server-book-dicoding.appspot.com/list&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132252316324bd0c0171af9c247588f079a45e08.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132252316324bd0c0171af9c247588f079a45e08.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah mengisikan request URLnya coba kita tekan tombol&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;“Send”&lt;/em&gt;&lt;/span&gt;. Maka respon yang akan didapatkan adalah daftar buku dalam bentuk JSON.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132252561d2ed5fd42e7c2b84d25fe56b9c32f5a.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132252561d2ed5fd42e7c2b84d25fe56b9c32f5a.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika penyedia data menyediakan Web API secara terbuka atau dapat diakses &amp;nbsp;umum, biasanya ia akan membuat sebuah dokumentasi cara penggunaan API. Di sana kita dapat menemukan informasi endpoint mana saja yang dapat kita akses, method apa saja yang diperlukan, ataupun format atau struktur seperti apa yang perlu diterapkan untuk mengirim data. Dokumentasi tersebut sangatlah penting karena melalui itulah seorang developer jadi tahu bagaimana ia bisa memanfaatkan Web API tersebut.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dokumentasi dari Web API yang kita gunakan pada contoh di atas dapat kita lihat pada tautan berikut&amp;nbsp;&lt;a href=&quot;https://web-server-book-dicoding.appspot.com/&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://web-server-book-dicoding.appspot.com/&lt;/a&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313225338bb74016a898e8187cf6da8c639a2b667.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313225338bb74016a898e8187cf6da8c639a2b667.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dari dokumentasi tersebut kita menjadi tahu ternyata kita dapat menambahkan data buku baru dengan mengakses endpoint&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;/add&lt;/em&gt;&lt;/span&gt;. Di sana juga kita bisa melihat method, headers, serta body apa yang perlu kita terapkan dalam melakukan request tersebut. Sehingga kita dapat mencobanya pada pada Postman.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132254066304010fc29b90c06fd0f8993840fefe.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132254066304010fc29b90c06fd0f8993840fefe.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Anda juga bisa mencoba fungsi lain seperti menghapus atau mengubah data buku melalui Web API tersebut. Jika Anda masih belum terbiasa dengan Postman, terdapat artikel yang cukup bagus sebagai panduan menggunakan Postman untuk Pemula.&amp;nbsp;&lt;a href=&quot;https://www.guru99.com/postman-tutorial.html&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://www.guru99.com/postman-tutorial.html&lt;/a&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/3571832215960958171'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/3571832215960958171'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/apa-itu-web-api.html' title='Apa itu Web API?'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-6439526867071830012</id><published>2020-04-29T01:00:00.000+07:00</published><updated>2020-11-27T21:02:34.667+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Apa Itu Webpack?</title><content type='html'>&lt;h2 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;What is Webpack?&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada dasarnya webpack merupakan module bundler untuk aplikasi JavaScript modern. Ketika webpack dijalankan pada proyek kita, di belakang layar webpack akan mengobservasi module apa saja yang kita gunakan dan membuat modul-modul tersebut dibungkus menjadi satu berkas (atau lebih).&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;span class=&quot;fr-img-caption fr-fic fr-dib&quot; style=&quot;box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; text-align: center; vertical-align: top; width: 873px;&quot;&gt;&lt;span class=&quot;fr-img-wrap&quot; style=&quot;box-sizing: border-box; display: inline-block; margin: auto; padding: 0px; width: 757px;&quot;&gt;&lt;img alt=&quot;20200313163923ddf1c4f937107ffe80d299dd072edcb2.gif&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313163923ddf1c4f937107ffe80d299dd072edcb2.gif&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; margin: auto; max-width: 100%; position: relative; vertical-align: middle; width: 757px;&quot; /&gt;&lt;span class=&quot;fr-inner&quot; style=&quot;box-sizing: border-box; display: block; font-size: 14px; font-weight: initial; margin: auto; opacity: 0.9; padding: 5px 5px 10px; width: 757px;&quot;&gt;Ilustrasi diambil dari&amp;nbsp;&lt;a href=&quot;https://www.google.com/url?q=https://webpack.js.org/&amp;amp;sa=D&amp;amp;ust=1584095945328000&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://webpack.js.org/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan menggunakan Webpack kita dapat leluasa menggunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;module&lt;/em&gt;&amp;nbsp;yang saling bergantungan. Webpack akan menggabungkan seluruh module yang digunakan baik itu modul yang kita tuliskan sendiri atau module yang kita dapatkan melalui NPM menjadi static assets yang siap digunakan pada tahap produksi.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Webpack pertama kali dirilis pada tanggal 10 Maret 2012. Sebelum ada webpack sebenarnya sudah terdapat tools lain yang serupa seperti&amp;nbsp;&lt;a href=&quot;http://browserify.org/&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Browserify&lt;/em&gt;&lt;/a&gt;. Disamping sebagai module bundler, Browserify sejatinya memiliki tujuan sebagai tools yang dapat membawa node package apapun agar dapat berjalan pada browser (kita dapat melihat tujuan dari namanya “Browserify”).&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003131641407c75dde829df2e4afb61ce3743710a92.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003131641407c75dde829df2e4afb61ce3743710a92.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Secara tidak langsung ia perlu berperan sebagai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;module bundler&lt;/em&gt;. Sebabnya, ketika menggunakan node package, tentu package tersebut terpisah dari kode yang kita tuliskan sendiri. Untuk menggabungkannya, Node.js menggunakan perintah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;require()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Dengan menggunakan browserify ini, perintah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;require()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tersebut dapat kita gunakan pada browser (&lt;em style=&quot;box-sizing: border-box;&quot;&gt;melalui transpiling&lt;/em&gt;).&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dari segi konsep, browserify dan webpack sangatlah berbeda. Namun kita dapat mengkategorikan keduanya sebagai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;module bundler&lt;/em&gt;. Kelebihan webpack dibandingkan dengan browserify yaitu webpack dapat memproses berkas/module lain diluar JavaScript seperti TypeScript, Sass tanpa bantuan task runner seperti Grunt atau Gulp. &amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sekitar awal tahun 2014 hingga pertengahan tahun 2015 browserify ini populer digunakan oleh developer. Hingga pada akhir tahun 2015 webpack-lah yang menggantikan kepopulerannya. Saat ini webpack sudah menyentuh versi 4 dengan mengusung kemampuan zero configuration-nya.&amp;nbsp;&lt;/div&gt;&lt;h2 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Core Concepts&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk lebih memahami bagaimana webpack bekerja, ketahui dulu core concepts yang ada pada webpack.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313170447aa5038400842a2473e645458aeb8d7ea.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313170447aa5038400842a2473e645458aeb8d7ea.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Terdapat 5 (lima) konsep penting dalam webpack yang perlu kita ketahui sebelum menggunakan webpack itu sendiri. Dari 5 (lima) konsep tersebut kita tahu bagaimana perilaku dari webpack ketika ia dijalankan. Berikut penjelasan singkat dari kelima konsep tersebut:&lt;/div&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Entry&lt;/em&gt;&lt;/span&gt;&amp;nbsp;: Titik awal di mana webpack akan menganalisa berkas dan membentuk dependency graph.&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Output&lt;/em&gt;&lt;/span&gt;&amp;nbsp;: Berkas bundel yang dihasilkan dari berkas-berkas yang dianalisis webpack berdasarkan entry point.&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Loaders&lt;/em&gt;&lt;/span&gt;&amp;nbsp;: &amp;nbsp;Transformation tools pada webpack, yang akan memproses setiap berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;selain JavaScript atau JSON&lt;/span&gt;&amp;nbsp;yang kita impor menjadi format yang dapat digunakan ke tahap produksi.&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Plugin&lt;/em&gt;&lt;/span&gt;&amp;nbsp;: &amp;nbsp;Digunakan untuk melakukan tugas seperti optimasi bundel, management aset dan sebagainya.&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Mode&lt;/em&gt;&lt;/span&gt;&amp;nbsp;: Kondisi yang digunakan webpack sebagai acuan optimasi apa saja yang harus diterapkan dalam melakukan tugasnya. Dalam&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;mode&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kita dapat menetapkan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;production&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;development&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;ataupun&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;none&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Entry&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Entry&lt;/em&gt;&amp;nbsp;atau&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;entry point&lt;/em&gt;&amp;nbsp;merupakan modul pertama yang akan dianalisa oleh webpack ketika ia dijalankan. Melalui entry point inilah webpack akan membentuk&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;dependency graph&lt;/em&gt;. Webpack akan mencari tahu modul lain yang digunakan pada entry point dan menggabungkannya menjadi satu&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;static assets&lt;/em&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada webpack 4 standarnya nilai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;entry point&lt;/em&gt;&amp;nbsp;akan ditempatkan pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;./src/index.js&lt;/em&gt;&lt;/span&gt;. Namun kita dapat menetapkan lokasi yang berbeda dengan mengatur properti entry pada berkas webpack configuration (&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack.config.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;). Contohnya:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./path/to/my/entry/file.js&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kode di atas merupakan cara cepat dalam penulisan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;entry&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Sebenarnya entry dapat berupa objek seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; main&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./path/to/my/entry/file.js&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita bisa memanfaatkan objek sebagai nilai entry ketika terdapat banyak&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;entry point&lt;/em&gt;&amp;nbsp;yang ingin kita tetapkan.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; app&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./src/app.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; adminApp&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./src/adminApp.js&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Output&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Output merupakan salah satu properti yang terdapat pada webpack configuration. Properti ini berfungsi untuk memberitahu webpack di mana dan bagaimana lokasi static assets yang telah dibundel harus disimpan dan diberi nama. Standarnya lokasi penyimpanannya berada pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;dist -&amp;gt; main.js&lt;/em&gt;&lt;/span&gt;. Lokasi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;dist&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan lokasi standar untuk menyimpan berkas yang dihasilkan oleh webpack.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita dapat mengkonfigurasi bagian output ini melalui properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;output&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack.config.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;seperti contoh berikut ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;path&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./path/to/my/entry/file.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; output&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;dist&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;my-first-webpack.bundle.js&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada contoh di atas, kita menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;output.filename&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;output.path&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;properties untuk memberitahu webpack penamaan dan lokasi&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;static assets&lt;/em&gt;&amp;nbsp;yang sudah dibundel. Pada contoh di atas juga kita dapat melihat modul&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;path&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang diimpor menggunakan Node.js module. Modul tersebut merupakan modul standar pada Node.js yang digunakan untuk memanipulasi lokasi berkas. Untuk memahami lebih dalam mengenai module path silakan cek &amp;nbsp;&lt;a href=&quot;https://nodejs.org/api/path.html&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://nodejs.org/api/path.html&lt;/a&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika kita menetapkan lebih dari satu entry point, kita perlu menggunakan&amp;nbsp;&lt;a href=&quot;https://webpack.js.org/configuration/output/#outputfilename&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;substitution&lt;/a&gt;&amp;nbsp;untuk memastikan berkas yang dihasilkan webpack memiliki nama unik.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; app&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./src/app.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; search&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./src/search.js&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; output&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;[name].js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; __dirname &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;/dist&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// webpack akan menghasilkan: ./dist/app.js, ./dist/search.js&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;output&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;memiliki banyak fitur dalam proses konfigurasinya. Jika Anda ingin belajar lebih dalam seputar penggunaannya, silakan cek dokumentasi webpack berikut:&amp;nbsp;&lt;a href=&quot;https://webpack.js.org/configuration/output/&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://webpack.js.org/configuration/output/&lt;/a&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Loaders&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dalam melaksanakan tugas, sejatinya Webpack hanya mengenali berkas JavaScript dan JSON. Namun melalui&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;loaders&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;webpack dapat memproses berkas berformat lain seperti css, sass, pug, jsx atau yang lainnya.&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Loaders&lt;/em&gt;&amp;nbsp;merupakan sebuah transformation tools pada webpack yang akan memproses setiap berkas selain JavaScript atau JSON yang kita impor menjadi format yang dapat digunakan ke tahap produksi.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika pada build tools lain seperti Gulp atau Grunt, loaders ini seperti “task”. Task ini sangat membantu dalam menangani proses&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;front-end building.&lt;/em&gt;&amp;nbsp;Loader dapat mengubah berkas bahasa pemrograman lain seperti TypeScript ke JavaScript. Yang paling spesial dari loader ini kita dapat melakukan import berkas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.css&lt;/em&gt;&amp;nbsp;langsung pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;entry point&lt;/em&gt;&amp;nbsp;layaknya berkas JavaScript pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;dependency graph&lt;/em&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003131716233f57b6b8ca088c0223cd40f39b99af85.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003131716233f57b6b8ca088c0223cd40f39b99af85.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemampuan impor pada modul apapun (contohnya&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;.css&lt;/em&gt;&lt;/span&gt;) merupakan fitur spesifik dari webpack yang mungkin tak akan kita jumpai pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;module bundler&lt;/em&gt;&amp;nbsp;atau&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;task runner&lt;/em&gt;&amp;nbsp;lain. Alhasil, kita dapat lebih leluasa lagi alias tak terbatas dengan tipe berkas dalam menggunakan module pada webpack.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk menetapkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;loaders&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kita gunakan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;module.rules&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada webpack configuration (&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack.config.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;). Di dalamnya terdapat dua high level properties yaitu&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;test&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;use&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Berikut penjelasan singkatnya:&lt;/div&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;Properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;test&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan tipe berkas yang akan ditransformasikan.&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;use&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;loader&lt;/em&gt;&amp;nbsp;mana yang akan digunakan untuk mentransformasikan berkas tersebut.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Belum terbayang bagaimana penggunaannya? Berikut contoh konfigurasi dari properti loader:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; rules&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; test&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;/\.css$/&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;css-loader&#39;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Konfigurasi di atas memiliki properti&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;module.rules&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&amp;nbsp;dan menetapkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;test&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;use&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di dalamnya. Konfigurasi seperti ini layaknya kita memberitahu “Hey webpack compiler! Ketika Anda bertemu dengan berkas .css yang dihubungkan menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;import&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;atau&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;require&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;statement&lt;/em&gt;, gunakanlah&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;css-loader&lt;/em&gt;&amp;nbsp;untuk mengubahnya sebelum membungkusnya ke dalam&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle&lt;/em&gt;”.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Banyak sekali loader yang dapat kita gunakan pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack configuration&lt;/em&gt;. Namun loader tersebut tidak disertakan langsung ketika kita menggunakan webpack. Jika kita ingin menggunakan loader katakanlah&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;css-loader&lt;/em&gt;, maka kita perlu memasang package loader tersebut melalui npm.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm install css&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;loader &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Contoh sebelumnya merupakan cara ringkas ketika kita menetapkan loader agar mudah dibaca. Melalui&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;module.rules&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sebenarnya kita dapat menetapkan banyak loader, namun dalam penulisannya kita perlu menetapkan loader tersebut secara eksplisit seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rules&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;/\.css$/&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;css-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dalam menuliskan banyak loader dalam satu rule, urutan deklarasi loader tersebut sangat berpengaruh. Loader akan tereksekusi dengan urutan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;dari bawah ke atas&lt;/span&gt;. Pada contoh di atas eksekusi akan dimulai dari&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;css-loader&lt;/em&gt;, lalu dilanjutkan oleh&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;style-loader&lt;/em&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan menuliskan loader secara eksplisit seperti ini, kita juga dapat dengan mudah menambahkan konfigurasi pada loader yang digunakan melalui properti options. Contohnya:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rules&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;/\.css$/&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style-loader&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; options&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// memasukkan style dengan tag &amp;lt;style&amp;gt; di bawah dari element &amp;lt;body&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; insert&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;body&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;css-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk melihat loader apa saja yang dapat kita manfaatkan pada webpack dan konfigurasi apa saja yang dapat diterapkan pada masing-masing loadernya, kita dapat melihatnya secara lengkap pada dokumentasi resmi webpack melalui tautan berikut:&amp;nbsp;&lt;a href=&quot;https://webpack.js.org/loaders/&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Webpack Loaders Documentation&lt;/a&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Plugin&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Plugin pada webpack digunakan untuk melakukan tugas seperti optimasi bundel, management aset dan sebagainya. Dengan adanya plugin ini, webpack menjadi lebih fleksibel. Plugin merupakan tulang punggung dari webpack. Bahkan webpack sendiri dibangun menggunakan sistem plugin yang sama seperti yang kita lakukan pada webpack configuration.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Webpack Plugin merupakan sebuah JavaScript objek yang dibangun menggunakan JavaScript class yang di dalamnya terdapat method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;apply&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan satu argument bernama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;compiler&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Kita dapat membuat webpack plugin sederhana dengan cara seperti ini:&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;panel panel-default panel-code&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a class=&quot;nav-link active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7190?from=7183#tab1-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;ConsoleLogOnBuildWebpackPlugin.js&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; pluginName &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;ConsoleLogOnBuildWebpackPlugin&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ConsoleLogOnBuildWebpackPlugin&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;options &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; options&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; apply&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;compiler&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; compiler&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;hooks&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;tap&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;pluginName&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; compilation &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ConsoleLogOnBuildWebpackPlugin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Ketika kita menggunakan plugin tersebut pada webpack configuration, ia akan mencetak nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.options.message&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;console&lt;/em&gt;&amp;nbsp;ketika proses build pada webpack berjalan.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk saat ini jangan terfokus pada cara membuat plugin di webpack. Alih-alih, fokuslah pada bagaimana ia digunakan pada webpack configuration. Karena plugin merupakan objek dan kita mungkin menyimpan konfigurasi ketika ia dibuat, maka dalam membuat objek plugin kita perlu menggunakan keyword&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;new&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ConsoleLogOnBuildWebpackPlugin&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./console-log-on-build-webpack-plugin.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; plugins&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ConsoleLogOnBuildWebpackPlugin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;The webpack build process is starting!&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Banyak plugin baik standar webpack atau pihak ketiga yang dapat kita manfaatkan pada webpack. Karena itulah kita tidak perlu fokus pada bagaimana membuat plugin. Untuk menggunakan plugin standar webpack, kita dapat mengaksesnya melalui objek&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; webpack &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// dibutuhkan untuk mengakses built-in plugins&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; plugins&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;webpack&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ProgressPlugin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun, untuk menggunakan beberapa plugin (di luar plugin standar yang disediakan) kita perlu memasangnya terlebih dahulu melalui npm. Contohnya plugin yang banyak digunakan untuk membuat berkas HTML pada webpack adalah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;html-webpack-plugin&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Untuk memasangnya kita gunakan perintah berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm install html&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webpack&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;plugin &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah memasangnya kita dapat menggunakannya pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack configuration&lt;/em&gt;&amp;nbsp;seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HtmlWebpackPlugin&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;html-webpack-plugin&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;//dipasang via npm&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; plugins&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HtmlWebpackPlugin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/index.html&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;index.html&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada contoh di atas, melalui&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;html-webpack-plugin&lt;/em&gt;&amp;nbsp;webpack akan menghasilkan berkas HTML untuk proyek kita dan memasukkan berkas yang sudah dibundel.&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Mode&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;mode&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan salah satu properti yang terdapat pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack configuration&lt;/em&gt;. Dengan memberikan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;mode&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;development&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;production&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;atau&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;none&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kita dapat melakukan optimasi pada webpack berdasarkan mode yang kita kehendaki. Jika kita tidak menetapkan nilai pada properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;mode&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, secara&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;default&lt;/em&gt;&amp;nbsp;akan bernilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;production&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;production&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Nilai mode juga dapat kita tetapkan melalui CLI argument seperti berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webpack &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode development&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita dapat melakukan optimasi pada webpack berdasarkan mode yang kita kehendaki karena tiap properti pada webpack configuration menyesuaikan pada modenya. Misalkan, jika kita menggunakan mode&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;development&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kita dapat menggunakan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;devtool&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;cache&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, atau properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;development&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;lainnya pada webpack configuration.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;development&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; devtool&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;eval&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; cache&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;true&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;devtool&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;atau&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;cache&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tentu tidak dapat kita gunakan dalam mode&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;production&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, tetapi kita dapat memanfaatkan properti-properti yang terdapat pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;production&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Begitu juga ketika kita menetapkan mode none. Untuk lebih lengkapnya, properti apa saja yang dapat kita manfaatkan di masing-masing modenya, silakan cek tautan berikut:&amp;nbsp;&lt;a href=&quot;https://webpack.js.org/configuration/mode/&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Webpack Configuration Mode&lt;/a&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika kita ingin mengubah perilaku webpack berdasarkan nilai mode di dalam&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack.config.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kita fungsi alih-alih objek.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; config &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./app.js&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;//...&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;env&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; argv&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;===&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;development&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; config&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;devtool &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;source-map&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;argv&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;===&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;production&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;//...&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;config&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Atau kita dapat menggunakan flag&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;--config&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;scripts&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;berkas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;package.json&lt;/span&gt;&lt;/em&gt;&amp;nbsp;untuk menetapkan berkas webpack configuration yang berbeda pada tiap modenya.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;scripts&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;build:prod&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack --config webpack.prod.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;build:dev&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack --config webpack.dev.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;h2 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Using Webpack&lt;/h2&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah mengetahui apa itu webpack dan seperti apa core concepts-nya, mungkin sebagian dari kita masih bingung jika belum mencobanya langsung. Untuk itu mari kita coba terapkan webpack pada proyek WebClock yang sudah kita buat sebelumnya. Karena pada proyek tersebut kita masih menggunakan tag&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dalam menggunakan package yang terpasang menggunakan npm.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sebelum melanjutkan ke materi selanjutnya. Pastikan Anda ikuti instruksi pada modul&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Node Package Manager&lt;/em&gt;&amp;nbsp;hingga proyek WebClock menghadirkan tampilan seperti ini:&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313192946751f2abb46ff53418e64c03942773582.gif&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313192946751f2abb46ff53418e64c03942773582.gif&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Belum ada tampilan demikian? Yuk baca kembali modul pada Node Package Manager dan ikuti instruksi di sana. Untuk Anda yang sudah sampai tahap tersebut, ayo kita gunakan webpack mulai dari cara memasangnya.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Installing Webpack&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Memasang webpack pada proyek kita sama seperti kita memasang package JQuery atau Moment.js. Namun webpack ini dipasang pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;devDependencies&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;karena sejatinya ia hanya digunakan selama proses pengembangan saja.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk memasang webpack silakan buka proyek Anda. Pada terminal kita tuliskan perintah berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm install webpack &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm install webpack&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cli &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Atau kita dapat menyingkat perintah tersebut dalam penulisan satu baris seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm install webpack webpack&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cli &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah berhasil memasang package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack&lt;/em&gt;&amp;nbsp;dan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack-cli&lt;/em&gt;, maka kita dapat melihat kedua package tersebut pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;devDependencies&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;package.json&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313193203eb8ab066c7cf5c7d36ee34ab304ee6be.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313193203eb8ab066c7cf5c7d36ee34ab304ee6be.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Mengapa kita membutuhkan dua package dalam memasang webpack? Apa fungsi package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack&lt;/em&gt;&amp;nbsp;dan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack-cli&lt;/em&gt;? Package webpack merupakan package inti dari webpack itu sendiri. Sedangkan package webpack-cli merupakan package yang digunakan untuk membantu kita menjalankan webpack melalui sebuah perintah (Command Line Interface). Pada CLI juga kita dapat memberikan argumen seperti menetapkan berkas webpack config, atau mode dalam proses build.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk menjalankan webpack kita perlu menambahkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;script&lt;/em&gt;&amp;nbsp;dengan perintah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;package.json&lt;/em&gt;&lt;/span&gt;&amp;nbsp;seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;scripts&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;test&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;echo \&quot;Error: no test specified\&quot; &amp;amp;&amp;amp; exit 1&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;start&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;http-server .&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;build&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita bisa menghapus script yang lainnya karena sudah tidak akan kita gunakan lagi. Sehingga sekarang berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;package.json&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webclock&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;version&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;1.0.0&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;description&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;main&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;index.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;scripts&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;build&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;license&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;ISC&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;dependencies&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;jquery&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^3.4.1&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;moment&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^2.24.0&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;devDependencies&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^4.41.6&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack-cli&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^3.3.11&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu untuk menjalankan script build, kita gunakan perintah berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm run build&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun untuk saat ini jika menjalankan script build akan terjadi eror seperti ini:&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003131934278ded0ab441e5a0bdb11a0e5f88fcfe66.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003131934278ded0ab441e5a0bdb11a0e5f88fcfe66.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dari pesan berikut, kita dapat menyimpulkan bahwa ketika kita tidak/belum menetapkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack configuration&lt;/em&gt;, nilai entry standarnya akan berlokasi pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; index.js&lt;/em&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;ERROR &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Entry&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;not&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; found&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Error&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Can&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;t resolve &#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;./&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39; in &#39;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;C&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;\Users\Dicoding\Desktop\WebClock&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk itu mari kita sesuaikan dengan membuat folder&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan memindahkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada folder tersebut. Sehingga struktur proyeknya akan tampak seperti ini:&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313193530ff33d34b4c276d7f0165d30a79a5179a.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313193530ff33d34b4c276d7f0165d30a79a5179a.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu coba kita jalankan kembali script&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;build&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, maka hasilnya akan tampak seperti ini:&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200314052546ad48eb36384caa7e498addc98e6ba500.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200314052546ad48eb36384caa7e498addc98e6ba500.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada struktur proyek kita juga terlihat terdapat folder baru dengan nama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;dist&lt;/em&gt;&lt;/span&gt;, di mana di dalamnya terdapat berkas main.js yang merupakan hasil bundel dari entry point&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; index.js&lt;/em&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika kita buka berkas tersebut, akan tampil banyak kode yang sulit kita baca. Jangan khawatir mengenai kode yang dihasilkan webpack itu. Namun jika dilihat pada akhir kodenya, kita akan menemukan kode asli yang kita tulis.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313193627744f50b9834d39a2b1709b03eebfa5d1.gif&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313193627744f50b9834d39a2b1709b03eebfa5d1.gif&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Karena kita sudah menggunakan webpack untuk membundel&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;module&lt;/em&gt;. Kita dapat menggunakan perintah import pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;src -&amp;gt; index.js&lt;/span&gt;&lt;/em&gt;&amp;nbsp;dalam menggunakan package npm.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; $ &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;jquery&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;moment&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;moment&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;displayTime &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; moment&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;locale&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; $&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;.time&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;moment&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;LTS&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;));&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; $&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;.date&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;moment&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;LL&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;));&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;updateTime &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; displayTime&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; setTimeout&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;updateTime&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;updateTime&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.html&lt;/em&gt;&lt;/span&gt;, kita dapat menggantikan seluruh tag&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang ada dengan satu tag&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang ditujukan pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;dist -&amp;gt; main.js&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;dec&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;Clock Web&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;link&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style.css&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;div&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;clock&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;span&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;time&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;span&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;date&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;script&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./dist/main.js&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu kita build ulang proyek dengan menjalankan perintah:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm run build&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;build&lt;/em&gt;&amp;nbsp;selesai dan menghasilkan berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;dist -&amp;gt; main.js&amp;nbsp;&lt;/em&gt;&lt;/span&gt;yang baru, proyek WebClock seharusnya sudah bisa berjalan dengan baik ketika kita membuka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.html&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313193821f67bcef3c951b5caf7555647b17fd05b.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313193821f67bcef3c951b5caf7555647b17fd05b.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: Quicksand, sans-serif !important; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Creating configuration files&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Sebelumnya kita menggunakan webpack dengan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;zero configuration&lt;/em&gt;. Apa artinya? Kita dapat menggunakan webpack tanpa membuat berkas webpack configuration sama sekali.&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Zero configuration&lt;/em&gt;&amp;nbsp;ini fitur baru dari webpack 4. Namun kekurangan dalam zero configuration adalah kita tidak dapat menyesuaikan konfigurasi yang kita inginkan ketika menggunakan webpack. Katakanlah jika kita perlu menggunakan sebuah loader atau plugin, tentu dengan zero configuration kita tidak dapat menggunakannya.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Kita dapat membuat berkas webpack configuration dengan membuat berkas JavaScript baru dengan nama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack.config.js&amp;nbsp;&lt;/em&gt;&lt;/span&gt;pada root folder proyek kita.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003131940148f638bc852c2ddab2f771515a65338b0.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003131940148f638bc852c2ddab2f771515a65338b0.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Nama berkas tersebut merupakan nama standar bagi berkas webpack configuration. Kita dapat menetapkan nama lain sesuka kita namun kita perlu menambahkan argument&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;--config&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada webpack CLI. Kita akan mencoba hal ini nanti. Saat ini kita fokus dulu bagaimana cara menuliskan sintaks pada berkas webpack configuration.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Pada materi sebelumnya kita sudah mengenal konsep inti dari webpack ini. Ada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;entry&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;output&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;loader&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;plugins&lt;/em&gt;&amp;nbsp;dan mode. Kelima konsep inti tersebut dapat menentukan perilaku webpack dalam melaksanakan tugasnya. Untuk konfigurasi awal, kita tetapkan terlebih dahulu&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;entry&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;output&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada webpack configuration. Caranya dengan tambahkan kode berikut pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack.config.js&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;path&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/index.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;dist&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;bundle.js&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Pada nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;entry&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;walaupun kita menetapkannya namun tidak ada nilai yang berbeda seperti nilai standar yaitu&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; index.js&lt;/em&gt;&lt;/span&gt;. Namun pada nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;output&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kita mengubah penamaan berkas hasil bundel dari&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;main.js&lt;/em&gt;&amp;nbsp;(nilai standar) menjadi&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;. Sehingga ketika kita jalankan kembali script&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;build&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm run build&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Maka akan terdapat berkas bundel baru bernama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;bundle.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031319450425966a4f5f052bd524adcdefcecb82a3.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031319450425966a4f5f052bd524adcdefcecb82a3.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Namun kita juga masih dapat melihat berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;main.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang merupakan berkas lama hasil proses build sebelumnya. Kita dapat menghapusnya karena sudah tidak digunakan lagi. Namun jangan lupa mengubah target berkas JavaScript yang dilampirkan pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.html&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;dec&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;Clock Web&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;link&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style.css&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;div&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;clock&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;span&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;time&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;span&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;date&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;script&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./dist/bundle.js&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Jika kita membuka&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;index.html&lt;/span&gt;&lt;/em&gt;&amp;nbsp;maka akan tampil hasil yang sama seperti sebelumnya. Karena memang kita tidak melakukan apapun selain mengubah nama hasil bundel dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;main.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;(nilai standar) menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Pada saat proses bundle, coba kita lihat pada Terminal. Terdapat&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;warning&lt;/em&gt;&amp;nbsp;yang menunjukkan bahwa kita tidak menetapkan mode pada berkas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack configuration&lt;/em&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313194640a7040e4ef237e1dc7852c1e0a379a595.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313194640a7040e4ef237e1dc7852c1e0a379a595.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Jika kita tidak menetapkan nilai pada properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;mode&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;maka nilai standar akan diterapkan, yakni nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;production&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Namun daripada kita membiarkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;mode&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;ini tidak memiliki nilai, sebaiknya kita tetapkan saja nilai modenya. Untuk saat ini, kita tetapkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;mode&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;production&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;path&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/index.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;dist&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;bundle.js&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;production&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Lalu coba jalankan kembali script&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;build&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Maka warning mengenai properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;mode&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tidak akan muncul pada Terminal saat proses build berjalan.&lt;/div&gt;&lt;blockquote style=&quot;border-left: 2px solid rgb(94, 53, 177); box-sizing: border-box; color: #5e35b1; margin: 0px 0px 1rem; padding-left: 5px;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;“Sebenarnya kita juga dapat melihat warning lain yang menunjukkan ukuran bundle.js sudah melampaui batas. Kita bisa lihat sendiri dengan membuka berkas bundle.js. Di sana kita akan menemukan banyak sekali kode yang dihasilkan dibandingkan dengan sebelumnya.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Hal ini disebabkan kode yang kita tulis memiliki ketergantungan (dependencies) terhadap package JQuery dan Moment. Sehingga package tersebut perlu dibundel juga pada berkas bundle.js. karena itulah berkas bundle.js menjadi bengkak ukurannya.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Ini merupakan salah satu alasan mengapa sebaiknya kita hindari penggunaan package pihak ketiga yang kita bawa hingga tingkat production. Membengkaknya berkas bundle.js, tentu akan berdampak terhadap performa web yang kita bangun nantinya.”&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Using Loader&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada penjelasan core concepts kita sudah tahu bahwa dengan loader, webpack dapat memproses berkas selain JavaScript. Dengan adanya loader kita dapat menggunakan CSS sebagai modul dan ikut terbundel bersama berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;&lt;/span&gt;. Sehingga kita tidak perlu lagi menerapkan tag&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;link&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.html&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;h4 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.5rem !important; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Style and CSS Loader&lt;/h4&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk menggunakan CSS modul pada webpack, kita membutuhkan dua buah loader. Yang pertama&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;css-loader&lt;/em&gt;&amp;nbsp;dan yang kedua&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;style-loader&lt;/em&gt;.&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;css-loader&lt;/em&gt;&amp;nbsp;merupakan loader untuk memproses berkas dengan format .css. Sedangkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;style-loader&lt;/em&gt;&amp;nbsp;merupakan loader yang digunakan untuk membuat&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;styling&lt;/em&gt;&amp;nbsp;dapat diterapkan secara modular dengan menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;import&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;statement.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk menggunakan kedua loader tersebut, langkah pertama adalah memasangnya melalui npm dengan perintah:&amp;nbsp;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm install style&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;loader css&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;loader &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah berhasil, pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack.config.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kita tambahkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;module.rules&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan isikan nilai loader seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;path&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/index.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;dist&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;bundle.js&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;production&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rules&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;/\.css$/&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;css-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah menambahkan loader pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack.config.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, sekarang kita dapat melakukan impor berkas CSS menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;import&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;statement layaknya berkas JavaScript.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun sebelum itu, pindahkan terlebih dahulu berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;style.css&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;agar lebih rapi ke dalam direktori baru dengan lokasi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; style -&amp;gt; style.css&lt;/em&gt;&lt;/span&gt;. Sehingga struktur proyek akan tampak seperti ini:&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313195233801f7eecca052bdc6bfed86c4136ea86.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313195233801f7eecca052bdc6bfed86c4136ea86.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.js&lt;/em&gt;&lt;/span&gt;, lakukan impor berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;style.css&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada awal baris kodenya.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./style/style.css&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Maka keseluruhan kode pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./style/style.css&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;$&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;jquery&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;moment&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;moment&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;displayTime &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; moment&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;locale&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; $&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;.time&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;moment&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;LTS&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;));&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; $&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;.date&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;moment&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;format&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;LL&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;));&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;updateTime &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; displayTime&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; setTimeout&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;updateTime&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;1000&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;updateTime&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan begitu kita tidak membutuhkan lagi tag&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;link&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.html&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dalam melampirkan stylesheet pada berkas style.css. Kita hapus tag&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;link&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;link&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style.css&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sehingga keseluruhan kode pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.html&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;dec&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;Clock Web&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;div&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;clock&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;span&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;time&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;span&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;date&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;script&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./dist/bundle.js&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah itu coba jalankan kembali script&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;build&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk menghasilkan berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang baru dan buka&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.html&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada browser. Seharusnya proyek WebClock menampilkan hasil yang sama seperti sebelumnya.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003131956308d12987bb21047da2fbf283a93369895.gif&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003131956308d12987bb21047da2fbf283a93369895.gif&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Selamat! Itu artinya, Anda berhasil menerapkan styling dengan cara modular menggunakan webpack loader. Jika Anda lihat pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;saat ini, kita dapat menemukan styling yang dituliskan.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031319565824078682376dded444e3b638090ac715.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031319565824078682376dded444e3b638090ac715.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Hal inilah mengapa styling dapat diterapkan tanpa harus menggunakan tag&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;link&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.html&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h4 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.5rem !important; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Babel Loader&lt;/h4&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita sudah berhasil menggunakan dan merasakan manfaat dari&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;style-loader&lt;/em&gt;&amp;nbsp;dan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;css-loader&lt;/em&gt;. Namun sebenarnya masih banyak loader lain yang tak kalah pentingnya untuk diterapkan pada webpack. Salah satunya adalah&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031319583407bf63e74fd402a5583504377dfd8829.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031319583407bf63e74fd402a5583504377dfd8829.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Mungkin sebagian dari kita sudah ada yang mengetahui apa itu&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel&lt;/em&gt;&amp;nbsp;atau&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel.js&lt;/em&gt;? Babel merupakan sebuah transpiler yang bertugas untuk mengubah sintaks JavaScript modern (ES6+) menjadi sintaks yang dapat didukung penuh oleh seluruh browser.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;JavaScript merupakan bahasa pemrograman yang berkembang sangat pesat. Komunitasnya besar, dan tiap tahun selalu terdapat versi yang baru. Namun perkembangan yang pesat tadi ternyata membutuhkan waktu yang lama untuk diadaptasi oleh browser atau Node.js. Lalu jika kita ingin mencoba sintaks terbaru di JavaScript apakah kita perlu menunggu hingga seluruh browser berhasil mengadaptasi pembaharuan tersebut? Tentu tidak!&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan babel Anda dapat menuliskan sintaks JavaScript versi terbaru tanpa khawatir memikirkan dukungan pada browser. Karena babel akan mengubah sintaks yang kita tuliskan menjadi kode yang dapat diterima browser.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika Anda penasaran bagaimana cara babel bekerja, babel menyediakan sebuah playground yang dapat kita manfaatkan untuk mengubah sintaks JavaScript modern (ES6+) menjadi sintaks lama. Untuk mencobanya, silakan Anda buka tautan berikut:&amp;nbsp;&lt;a href=&quot;https://babeljs.io/repl&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://babeljs.io/repl&lt;/a&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313195932ff6b88f0352e20c9c08f27fd89aff700.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313195932ff6b88f0352e20c9c08f27fd89aff700.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada playground tersebut kita juga dapat memilih preset yang kita inginkan. Secara default preset akan mengarah ES2015 (ES6).&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Anda sudah tahu &amp;nbsp;sekilas mengenai babel. Nah pada webpack kita juga dapat menggunakan babel dalam bentuk loader. Walaupun webpack secara standarnya dapat memproses berkas JavaScript tanpa perlu bantuan loader, namun proses tersebut tidak mengubah sintaks yang kita tuliskan. Artinya jika kita menuliskan sintaks JavaScript modern, maka kita akan menemukannya juga pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031320001286d0cce40a7f1f8ac22836dcbab4867b.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031320001286d0cce40a7f1f8ac22836dcbab4867b.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Walaupun saat ini Google Chrome dan Mozilla Firefox sudah mendukung penulisan sintaks ES6, namun setidaknya kita perlu sedikit peduli terhadap dukungan browser lama seperti Internet Explorer atau browser versi lama lainnya.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk menggunakan babel pada webpack sebagai loader, kita perlu memasang tiga package menggunakan npm pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;devDependencies&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Yang pertama package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;@babel/core&lt;/em&gt;, yang kedua&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;, dan yang ketiga&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;@babel/preset-env&lt;/em&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm install &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;@babel&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;core babel&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;loader &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;@babel&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;preset&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;env &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;@babel/core&lt;/em&gt;&amp;nbsp;merupakan package inti yang harus dipasang ketika kita hendak menggunakan babel, baik pada webpack maupun tools yang lain.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;&amp;nbsp;merupakan package yang diperlukan untuk menggunakan babel sebagai loader pada webpack.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Yang terakhir package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;@babel/preset-env&lt;/em&gt;&amp;nbsp;merupakan package preset yang akan kita gunakan untuk membantu&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;&amp;nbsp;dalam melakukan tugasnya.&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;@babel/preset-env&lt;/em&gt;&amp;nbsp;merupakan preset cerdas yang memungkinkan kita menggunakan sintaks JavaScript terbaru tanpa menetapkan secara spesifik sintaks JavaScript versi apa yang kita gunakan.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;package.json&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan tampak seperti ini setelah memasang ketiga package tersebut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webclock&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;version&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;1.0.0&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;description&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;main&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;index.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;scripts&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;build&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;author&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;license&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;ISC&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;dependencies&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;jquery&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^3.4.1&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;moment&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^2.24.0&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;devDependencies&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;@babel/core&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^7.8.4&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;@babel/preset-env&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^7.8.4&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;babel-loader&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^8.0.6&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;css-loader&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^3.4.2&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style-loader&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^1.1.3&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^4.41.6&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack-cli&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;^3.3.11&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah berhasil memasang ketiga package tersebut, langkah selanjutnya kita dapat gunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;&amp;nbsp;dan preset-nya pada webpack configuration.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;path&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/index.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;dist&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;bundle.js&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;production&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rules&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* style and css loader */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;/\.css$/&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;css-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* babel loader */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;/\.js$/&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exclude&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;/node_modules/&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;babel-loader&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; options&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; presets&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;@babel/preset-env&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Ketika menerapkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;rule&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk berkas&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;.js&lt;/em&gt;&lt;/span&gt;, jangan lupa untuk menetapkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;exclude&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan nilai “&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;/node_modules/&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;”. Apa artinya? Dengan menetapkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;exclude&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;itu berarti kita mengecualikan webpack untuk memproses berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang berada pada folder&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;“node_modules&lt;/em&gt;”. Hal ini dapat meminimalisir proses yang tidak diperlukan, sehingga mempercepat proses build pada proyek kita. &amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu pada penerapan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;&amp;nbsp;juga kita menggunakan properti&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;options&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;dengan menetapkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;presets&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di dalamnya. Pada properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;presets&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kita tetapkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;preset&lt;/em&gt;&amp;nbsp;(dalam bentuk array literas) yang sudah kita pasang menggunakan npm, yaitu&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;@babel/preset-env&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah menggunakan babel loader pada webpack configuration, mari kita coba&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;build&lt;/em&gt;&amp;nbsp;dan buka kembali berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;&lt;/span&gt;. Maka kode yang kita tuliskan dalam ES6 akan diubah dalam sintaks yang dapat diterima oleh seluruh browser.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313200507f7a720e39de819c62a15f1be147aa62e.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313200507f7a720e39de819c62a15f1be147aa62e.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Bahkan pada berkas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle&lt;/em&gt;&amp;nbsp;tersebut dipastikan sudah tidak terdapat lagi sintaks yang dituliskan menggunakan ES6.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313200535f035aab9b99622b9e95be3f0d98fc827.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313200535f035aab9b99622b9e95be3f0d98fc827.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun walaupun sintaksnya sudah diubah, proyek akan tetap berjalan normal seperti biasanya.&lt;/div&gt;&lt;h2 dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; color: inherit; font-family: Quicksand, sans-serif !important; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Webpack Dev Server&lt;/h2&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Saat ini setiap terjadi perubahan kode pada proyek, Anda perlu melakukan build ulang untuk melihat hasilnya. Tak peduli perubahan tersebut bersifat &amp;nbsp;mayor ataupun hanya sekadar ganti warna saja. Karena untuk melihat perubahan terbaru kita juga perlu memperbaharui berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;bundle.js&lt;/em&gt;&lt;/span&gt;. Tentu sangat merepotkan bukan?&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Untunglah webpack menyediakan fitur live-reloading yang dapat mempercepat proses pengembangan menggunakan Webpack Dev Server. Dengan ini kita dapat melihat perubahan secara langsung tanpa harus menjalankan ulang perintah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;build&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Untuk menggunakan Webpack Dev Server langkah pertama adalah kita pasang package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack-dev-server&lt;/em&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;devDependencies&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menggunakan npm.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm install webpack&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;server &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Setelah berhasil memasangnya, kita tambahkan script&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;start-dev&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan perintah “&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack-dev-server&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;” pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;package.json&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;scripts&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;build&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;start-dev&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack-dev-server&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Mari kita jalankan script&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;start-dev&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan perintah:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm run start&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Setelah menjalankan perintah di atas, pada terminal kita dapat melihat alamat&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;localhost:8080&lt;/em&gt;. Alamat tersebut digunakan untuk melihat proyek yang sedang kita kembangkan pada browser.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132019248725f53a4bca9fccd53a300da521d958.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132019248725f53a4bca9fccd53a300da521d958.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Webpack Dev Server secara standar memiliki fitur&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;live-reloading&lt;/em&gt;. Artinya setiap terjadi perubahan terhadap assets yang digunakan (HTML, CSS, atau JS) dan menyimpan perubahannya (&lt;em style=&quot;box-sizing: border-box;&quot;&gt;save&lt;/em&gt;), ia akan melakukan melakukan proses&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;compiling&lt;/em&gt;&amp;nbsp;ulang dan menampilkan hasil perubahan langsung pada browser.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313202124bafcb1767b5e2c4612e445a32bab8535.gif&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313202124bafcb1767b5e2c4612e445a32bab8535.gif&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Namun jika kita lihat proses&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;compiling&lt;/em&gt;&amp;nbsp;memakan waktu yang cukup lama bukan? Pada contoh gif di atas, butuh setidaknya 5 detik untuk Webpack Dev Server menampilkan perubahan terbaru pada browser. Mengapa bisa demikian?&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Hal tersebut terjadi karena kita menggunakan mode&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;production&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dalam menjalankan Webpack Dev Server. Ketika menggunakan mode production maka webpack melakukan bundling module seoptimal mungkin sehingga proses membutuhkan waktu lebih lama dibandingkan dengan mode&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;development&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Selain itu, pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack configuration&lt;/em&gt;&amp;nbsp;kita menggunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;. Proses compiling yang lama akan terasa lebih lama lagi karena kita harus melalui proses transpiling kode JavaScript melalui&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;babel-loader&lt;/em&gt;.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Solusinya, pisahkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack configuration&lt;/em&gt;&amp;nbsp;untuk development dan production.&lt;/div&gt;&lt;blockquote style=&quot;border-left: 2px solid rgb(94, 53, 177); box-sizing: border-box; color: #5e35b1; margin: 0px 0px 1rem; padding-left: 5px;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Untuk menghentikan service&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack-dev-server&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;, gunakan kombinasi ctrl + c pada terminal yang digunakan. Ingatlahbahwa sebaiknya kita hentikan service&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack-dev-server&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;setiap kali ingin melakukan perubahan pada berkas webpack configuration.&lt;/div&gt;&lt;/blockquote&gt;&lt;h2 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Configuration Environment&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Tujuan dari&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;development&lt;/em&gt;&amp;nbsp;dan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;production&lt;/em&gt;&amp;nbsp;memanglah berbeda. Pada tahap&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;development&lt;/em&gt;&amp;nbsp;webpack akan menerapkan konfigurasi yang selalu optimal untuk mempercepat proses perubahan pada browser (&lt;em style=&quot;box-sizing: border-box;&quot;&gt;hot reloading&lt;/em&gt;). Sedangkan pada proses production kita ingin fokus terhadap optimasi bundling dan kompatibilitasnya pada browser. Karena perbedaan fokus tersebut sebaiknya kita memisahkan konfigurasi antara keduanya.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313202603b0a75a4a5caa86c71871610658933e74.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313202603b0a75a4a5caa86c71871610658933e74.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun jika berpatokan pada bagan di atas, antara keduanya terdapat konfigurasi umum (common) seperti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;entry&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;output&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;style-loader&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;css-loader&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;HtmlWebpackPlugin&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Untuk menghindari penulisan berulang, kita dapat menggunakan tools yang bernama&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack-merge&lt;/em&gt;&amp;nbsp;yang berfungsi untuk menggabungkan konfigurasi umum dengan konfigurasi unik tiap environment-nya.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031320274773a72ddcc2ce0672b38d5e54a9b9d640.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031320274773a72ddcc2ce0672b38d5e54a9b9d640.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Using webpack-merge&lt;/h3&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack-merge&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;langkah awal adalah dengan memasang package tersebut pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;devDependencies&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menggunakan NPM.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;npm install webpack&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;merge &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;--&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;save&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dev&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian kita buat berkas webpack konfigurasi baru dengan nama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack.common.js&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313202917357502a1b9a527cd74048d4af80fbaf7.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313202917357502a1b9a527cd74048d4af80fbaf7.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Di dalam berkas tersebut kita tuliskan konfigurasi umum yang digunakan pada setiap environment baik itu&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;production&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;atau&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;development&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;path&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HtmlWebpackPlugin&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;html-webpack-plugin&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; entry&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/index.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; output&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; path&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;resolve&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;__dirname&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;dist&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;bundle.js&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rules&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* style and css loader */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;/\.css$/&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;css-loader&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* plugin */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; plugins&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* HTML Webpack Plugin */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HtmlWebpackPlugin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/template.html&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filename&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;index.html&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian kita buat 2 (dua) berkas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack configuration&lt;/em&gt;&amp;nbsp;baru dengan nama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack.prod.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack.dev.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132030400247cbd50837f2c5b60c75395d5384c1.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132030400247cbd50837f2c5b60c75395d5384c1.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian pada masing-masing berkasnya, tuliskan kode berikut:&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a class=&quot;nav-link active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7239?from=7232#tab1-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;webpack.prod.js&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; merge &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack-merge&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;common &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./webpack.common.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; merge&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;common&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;production&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rules&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* babel loader */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;/\.js$/&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exclude&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;/node_modules/&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loader&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;babel-loader&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; options&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; presets&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;@babel/preset-env&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link active show&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7239?from=7232#tab1-code2&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;webpack.dev.js&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane active show&quot; id=&quot;tab1-code2&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; merge &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack-merge&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;common &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;require&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./webpack.common.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; merge&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;common&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;development&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Di dalam berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;webpack.common.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kita sudah menetapkan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;entry&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;output&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;beberapa&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;loader&lt;/em&gt;, dan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;plugin&lt;/em&gt;&amp;nbsp;yang nilainya digunakan pada kedua environment. Sehingga kita tidak perlu menetapkannya lagi pada masing-masing berkas konfigurasi environment-nya.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Perhatikan juga bahwa kita menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;merge()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dari package&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack-merge&lt;/em&gt;, untuk memasukkan konfigurasi umum pada konfigurasi tiap environment-nya.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;module&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;exports &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; merge&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;common&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;…&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Setelah menetapkan konfigurasi umum dan konfigurasi pada tiap environment, mari ubah perintah script&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;build&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;start-dev&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;package.json&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;scripts&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;build&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack --config webpack.prod.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;start-dev&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;webpack-dev-server --config webpack.dev.js&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Dengan menambahkan flag&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;--config [config-files]&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&amp;nbsp;pada script&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;build&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;start-dev&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, maka Anda dapat secara leluasa menghapus berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack.config.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;karena memang sudah tidak digunakan lagi. Sehingga pada proyek WebClock hanya terdapat 3 (tiga) berkas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;webpack configuration&lt;/em&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003132035126bfffe874273fbdfcae56ed9370be089.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003132035126bfffe874273fbdfcae56ed9370be089.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Coba kita jalankan kembali script&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;start-dev&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;ya. Seharusnya fitur&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;live-reloading&lt;/em&gt;&amp;nbsp;akan berjalan lebih cepat.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313203633827ca43f7ab670daa8d217cc826e4f88.gif&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313203633827ca43f7ab670daa8d217cc826e4f88.gif&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/6439526867071830012'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/6439526867071830012'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/apa-itu-webpack.html' title='Apa Itu Webpack?'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-5764064876583572085</id><published>2020-04-28T23:02:00.000+07:00</published><updated>2020-11-27T21:02:34.763+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Apa Itu Shadow DOM?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Shadow DOM dapat mengisolasi sebagian struktur DOM di dalam komponen sehingga tidak dapat disentuh dari luar komponen atau nodenya. Singkatnya kita bisa sebut Shadow DOM sebagai “DOM dalam DOM”. Bagaimana ia bekerja? Perhatikan ilustrasi berikut:&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;span class=&quot;fr-img-caption fr-fic fr-dib&quot; style=&quot;box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; text-align: center; vertical-align: top; width: 873px;&quot;&gt;&lt;span class=&quot;fr-img-wrap&quot; style=&quot;box-sizing: border-box; display: inline-block; margin: auto; padding: 0px; width: 757px;&quot;&gt;&lt;img alt=&quot;2020031020401056fdb6ae992399a36fcbfa50e75cf4ee.png&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031020401056fdb6ae992399a36fcbfa50e75cf4ee.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; margin: auto; max-width: 100%; position: relative; vertical-align: middle;&quot; /&gt;&lt;span class=&quot;fr-inner&quot; style=&quot;box-sizing: border-box; display: block; font-size: 14px; font-weight: initial; margin: auto; opacity: 0.9; padding: 5px 5px 10px; width: 757px;&quot;&gt;Sumber:&amp;nbsp;&lt;a href=&quot;https://www.google.com/url?q=https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM&amp;amp;sa=D&amp;amp;ust=1583841656284000&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Shadow DOM dapat membuat DOM Tree lain terbentuk secara terisolasi melalui host yang merupakan komponen dari regular DOM Tree (Document Tree). Shadow DOM Tree ini dimulai dari root bayangan (Shadow root), yang dibawahnya dapat memiliki banyak element lagi layaknya Document Tree.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Terdapat beberapa terminologi yang perlu kita ketahui dari ilustrasi di atas:&lt;/div&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Shadow host&lt;/em&gt;&lt;/span&gt;&amp;nbsp;: Merupakan komponen/node yang terdapat pada regular DOM di mana shadow DOM terlampir pada komponen/node ini.&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Shadow tree&amp;nbsp;&lt;/em&gt;&lt;/span&gt;: DOM Tree di dalam shadow DOM.&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Shadow boundary&lt;/em&gt;&lt;/span&gt;&amp;nbsp;: Batas dari shadow DOM dengan regular DOM.&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Shadow root&lt;/em&gt;&lt;/span&gt;&amp;nbsp;: Root node dari shadow tree.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita dapat memanipulasi elemen yang terdapat di dalam shadow tree layaknya pada document tree, namun cakupannya selama kita berada di dalam shadow boundary. Dengan kata lain, jika kita berada di document tree kita tidak dapat memanipulasi elemen bahkan menerapkan styling pada elemen yang terdapat di dalam shadow tree. Itulah mengapa shadow DOM dapat membuat komponen terenkapsulasi&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk melampirkan Shadow DOM pada elemen penggunaan sangat mudah, yaitu dengan menggunakan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;attachShadow&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada elemen-nya seperti ini:&lt;/div&gt;&lt;div class=&quot;panel panel-default panel-code&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link active show&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7057?from=7050#tab1-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;main.js&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Shadow Host&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;divElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;div&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// element yang berada di dalam Shadow DOM&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;headingElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;h1&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;headingElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerText &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ini merupakan konten di dalam shadow DOM&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Melampirkan shadow root pada shadow host&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Mengatur mode shadow dengan nilai open&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;shadowRoot &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; divElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Memasukkan element heading ke dalam shadow root&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowRoot&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;headingElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Memasukkan elemen shadow host ke regular DOM&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;divElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7057?from=7050#tab1-code2&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;index.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code2&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;dec&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;meta&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;charset&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;meta&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;viewport&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;width=device-width&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;Shadow DOM Basic Usage&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;script&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;main.js&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika kita lihat pada browser, maka struktur HTML yang akan dihasilkan adalah seperti ini:&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;img alt=&quot;2020031020442138d22cf8f4814aacc795f563c3015892.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031020442138d22cf8f4814aacc795f563c3015892.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dan struktur DOM tree yang terbentuk akan tampak seperti ini:&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200310204452a9e4788ac5f7f206c20debfa0bc87524.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200310204452a9e4788ac5f7f206c20debfa0bc87524.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dalam penggunaan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;attachShadow()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kita melampirkan objek dengan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;mode&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang memiliki nilai ‘&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;open&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;’. Sebenarnya terdapat dua opsi nilai yang dapat digunakan dalam properti mode, yaitu “&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;open&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;” dan “&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;closed&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;”.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Menggunakan nilai open berarti kita memperbolehkan untuk mengakses properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;shadowRoot&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;melalui elemen yang melampirkan Shadow DOM.&amp;nbsp;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;divElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;properti shadowRoot mengembalikan struktur DOM yang berada pada shadow tree.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200310204643a7a1f999761eaf74f9476e50013bb373.gif&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200310204643a7a1f999761eaf74f9476e50013bb373.gif&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun jika kita menggunakan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;closed&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;maka properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;shadowRoot&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan mengembalikan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;null&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; shadowRoot &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; divElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;closed&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;divElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowRoot &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// null;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Hal ini berarti kita sama sekali tidak dapat mengakses Shadow Tree selain melalui variabel yang kita definisikan ketika melampirkan Shadow DOM.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; shadowRoot &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; divElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;closed&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;divElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowRoot&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// null;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowRoot &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// # shadow-root (closed)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031020483296ef7fce493fd7c0528697c3fa03565b.gif&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031020483296ef7fce493fd7c0528697c3fa03565b.gif&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Karena Shadow DOM terisolasi dari document tree maka element yang terdapat di dalamnya pun tidak akan terpengaruh oleh styling yang berada diluar dari shadow root-nya.&lt;/div&gt;&lt;div class=&quot;panel panel-default panel-code&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a class=&quot;nav-link active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7057?from=7050#tab2-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;index.html&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab2-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;dec&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;meta&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;charset&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;meta&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;viewport&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;width=device-width&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;Shadow DOM Basic Usage&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;h1&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; red&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;Ini merupakan konten yang berada di Document tree&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;script&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;main.js&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link active show&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7057?from=7050#tab2-code2&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;main.js&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane active show&quot; id=&quot;tab2-code2&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Shadow Host&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;divElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;div&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// element yang berada di dalam Shadow DOM&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;headingElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;h1&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;headingElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerText &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ini merupakan konten di dalam shadow DOM&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Melampirkan shadow root pada shadow host&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Mengatur mode shadow dengan nilai open&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;shadowRoot &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; divElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Memasukkan element heading ke dalam shadow root&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowRoot&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;headingElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Memasukkan elemen shadow host ke regular DOM&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;divElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika dilihat pada browser maka hasilnya akan seperti ini:&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;img alt=&quot;20200310205023649403bfa8d61e879afc65f4a050c502.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200310205023649403bfa8d61e879afc65f4a050c502.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Berdasarkan hasil di atas, styling hanya akan diterapkan pada elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang berada di document tree. Sedangkan elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang berada pada shadow dom tidak akan terpengaruh dengan styling tersebut. Lantas, bagaimana caranya kita melakukan styling pada Shadow DOM?&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita dapat melakukannya dengan menambahkan template&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di dalam&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;shadowRoot.innerHTML&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;. &amp;nbsp;Contohnya seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// menetapkan styling pada Shadow DOM&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowRoot&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp;h1 {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;color: green;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Maka element&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&amp;nbsp;tersebut akan berada di dalam shadow tree dan akan berdampak pada elemen yang ada di dalamnya.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200310205206823dcc0fb3c6ef38cb5e0a7563f0590d.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200310205206823dcc0fb3c6ef38cb5e0a7563f0590d.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/5764064876583572085'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/5764064876583572085'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/apa-itu-shadow-dom.html' title='Apa Itu Shadow DOM?'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-1537063948357209489</id><published>2020-04-28T22:06:00.000+07:00</published><updated>2020-11-27T21:02:34.851+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Belajar Membuat Custom Element Dan Shadow DOM Dasar di Javascript</title><content type='html'>&lt;b&gt;Ihsan Magazine &lt;/b&gt;- Kali ini kita akan mencoba belajar membuat Custom Element dasar di Javascript, apa itu Custom Element? Gampang nya Custom Element seperti kita Membuat Tag HTML baru untuk Front End Developer.&lt;br /&gt;&lt;br /&gt;Bisa untuk memperluas elemen bawaan HTML, dan masih banyak lagi, dasarnya menggunakan\ Elements global digunakan untuk mendefinisikan elemen khusus dan mengajarkan tag baru pada browser.&lt;br /&gt;&lt;br /&gt;Panggil customElements.define() dengan nama tag yang ingin Anda buat dan class JavaScript yang memperluas HTMLElement dasar.&lt;br /&gt;&lt;br /&gt;Selengkapnya &lt;a href=&quot;https://developers.google.com/web/fundamentals/web-components/customelements?hl=id&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Baca Disini&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Kali ini Study Kasus dengan &lt;b&gt;ClubFinder.zip&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Jika kita telaah dengan seksama, pada proyek Club Finder terdapat 4 (empat) bagian yang berpotensi untuk dijadikan custom element, yaitu:&lt;/b&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;App Bar : Komponen  di posisi atas yang menunjukkan identitas atau nama dari aplikasi web.&lt;/li&gt;&lt;li&gt;Search Bar : Komponen yang terdiri dari elemen &amp;lt;input&amp;gt; dan &amp;lt;button&amp;gt; dan berfungsi untuk melakukan pencarian club sesuai dengan input pengguna.&lt;/li&gt;&lt;li&gt;Club List : Komponen yang berfungsi untuk menampung data dari hasil pencarian, kemudian menampilkannya dalam bentuk list.&lt;/li&gt;&lt;li&gt;Club Item : Komponen yang menampilkan data individual club yang diberikan dari club list. Komponen ini terdiri dari gambar, nama, dan deskripsi singkat club.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;h2 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Solution: Membuat app-bar Component&lt;/h2&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Apakah Anda berhasil menerapkan custom element pada proyek Club Finder? Jika belum, mari kita lakukan bersama-sama. Kita mulai dari komponen termudah terlebih dahulu yaitu App Bar.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Agar mengelola berkas pada proyek jadi lebih mudah, kita perlu membuat folder baru dengan nama&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;“component”&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di dalam folder&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; script&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200310192559e057df7d65da0d6b4369a31dfa0bcf60.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200310192559e057df7d65da0d6b4369a31dfa0bcf60.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top; width: 300px;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Folder ini akan menampung berkas JavaScript yang digunakan dalam membuat custom element.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu di dalam folder component, buat berkas JavaScript baru dengan nama “&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;app-bar.js&lt;/em&gt;&lt;/span&gt;”. Kemudian kita buat class dengan nama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;AppBar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang mewarisi sifat&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;HTMLElement&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian di dalam body block classnya, kita implementasi method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;connectedCallback&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan membuat fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Seperti yang sudah kita ketahui,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;connectedCallback()&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&amp;nbsp;akan terpanggil ketika element telah diterapkan pada DOM. Jika kita ingin element ini ketika diterapkan langsung melakukan rendering maka kita dapat memanggil fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di dalam&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;connectedCallback&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu pada fungsi render, kita tuliskan kode yang berfungsi untuk menampilkan elemen yang dibutuhkan pada melalui properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Apa saja yang dibutuhkan? Kita bisa melihatnya pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;index.html&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;header&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;div&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;appBar&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;app-bar&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;Club Finder&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Di dalam elemen&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;header&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&amp;nbsp;terdapat elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;div&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang menerapkan class “&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;app-bar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;”. Nah kita copy element di dalam&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;app-bar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, dan paste untuk dijadikan nilai pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2&amp;gt;Club Finder&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu di akhir berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;app-bar.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, jangan lupa untuk definisikan custom element yang kita buat agar dapat digunakan pada DOM.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2&amp;gt;Club Finder&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;app-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan begitu kita dapat mengubah penerapan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;app-bar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;index.html&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan menggunakan tag&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;app-bar&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;header&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;app-bar&amp;gt;&amp;lt;/app-bar&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/header&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Terakhir, agar kode pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;app-bar.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tereksekusi, impor berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;app-bar.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;app.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/script/component/app-bar.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Tuliskan kode tersebut pada awal berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;app.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, sehingga keseluruhan kode pada berkasnya akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/script/component/app-bar.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; main &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./src/script/view/main.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;DOMContentLoaded&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian coba kita buka proyeknya menggunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;local server&lt;/em&gt;. Inilah tampilan hasilnya:&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031019350448bf1ff8d96767443908e81b171563c3.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031019350448bf1ff8d96767443908e81b171563c3.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Oops, tampilan App Bar tampak berantakan. Kita perlu memperbaiki css yang digunakan pada elemen App Bar sebelumnya. Buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;appbar.css&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;lalu ubah selector-nya dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;.app-bar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;app-bar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;background&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; cornflowerblue&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; white&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;8px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu lihat kita lihat hasilnya.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031019360718a18a9301e96c9237e9d2bd80d3dda2.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031019360718a18a9301e96c9237e9d2bd80d3dda2.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Yah, kini teks “Club Finder” tidak tampak karena background element tidak bekerja dengan baik. Kenapa begini yah? Pasalnya, custom element standarnya merupakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;inline element&lt;/em&gt;, sehingga tidak akan mengisi panjang lebar parent element-nya. Solusinya adalah dengan mengubah sifat&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;inline&lt;/em&gt;&amp;nbsp;pada custom element menjadi&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;block&lt;/em&gt;&amp;nbsp;dengan cara menambahkan properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;display&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;block&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada selector&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;app-bar&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;background&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; cornflowerblue&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; white&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;8px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan begitu tampilan kita berhasil membuat custom element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;app-bar&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan baik!&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;img alt=&quot;20200310193753886f026632febaa362d6775a39bbc28d.png&quot; height=&quot;494&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200310193753886f026632febaa362d6775a39bbc28d.png&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Membuat search-bar Component&lt;/h2&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pembuatan elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;search-bar&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;lebih sedikit rumit dari pembuatan komponen sebelumnya, karena di dalam komponen search bar terdapat element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;input&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;button&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Kombinasi kedua element tersebut digunakan dalam mencari data club. Sebisa mungkin kita membuat custom element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;search-bar&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sehingga &amp;nbsp; mempermudah kala menggunakan komponen tersebut.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Mari kita mulai dengan membuat berkas JavaScript baru dengan nama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;search-bar.js.&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;Kemudian di dalamnya kita membuat class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;SearchBar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan mewarisi sifat&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;HTMLElement&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian kita implementasi method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;connectedCallback&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan membuat fungsi render.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu panggil fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di dalam&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;connectedCallback()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Di dalam fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kita ambil elemen yang dibutuhkan untuk ditampilkan dari berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;index.html&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;div&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-container&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-container&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;input&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Search football club&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;searchElement&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;button&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;searchButtonElement&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;submit&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;Search&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Agar mudah,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;copy&lt;/em&gt;&amp;nbsp;seluruh kode tersebut dan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;paste&lt;/em&gt;&amp;nbsp;untuk dijadikan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di dalam fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div id=&quot;search-container&quot; class=&quot;search-container&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;input placeholder=&quot;Search football club&quot; id=&quot;searchElement&quot; type=&quot;search&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;button id=&quot;searchButtonElement&quot; type=&quot;submit&quot;&amp;gt;Search&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Karena di dalam elemen ini terdapat&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;button&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang harus memiliki sebuah event ketika ia ditekan, maka kita harus menyediakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;setter&lt;/em&gt;. Gunanya untuk menetapkan fungsi event agar dapat mudah diterapkan dari luar class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;SearchBar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div id=&quot;search-container&quot; class=&quot;search-container&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;input placeholder=&quot;Search football club&quot; id=&quot;searchElement&quot; type=&quot;search&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;button id=&quot;searchButtonElement&quot; type=&quot;submit&quot;&amp;gt;Search&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu kita terapkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this._clickEvent&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sebagai event pada element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;button&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan cara menuliskan kode berikut pada akhir fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchButtonElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;click&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sehingga kode pada fungsi render akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;div id=&quot;search-container&quot; class=&quot;search-container&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;input placeholder=&quot;Search football club&quot; id=&quot;searchElement&quot; type=&quot;search&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;button id=&quot;searchButtonElement&quot; type=&quot;submit&quot;&amp;gt;Search&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchButtonElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;click&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan begitu nantinya kita dapat mudah dalam&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;clickEvent&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;SearchBar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang digunakan di berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;main.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;main.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;juga kita memanfaatkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;value&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dari element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;input&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk mendapatkan kata kunci pencarian club. Agar mudah mendapatkan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;value&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dari elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;input&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang terdapat pada search bar, kita buat fungsi getter yang mengembalikan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;value&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dari elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;input&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tersebut.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sehingga keseluruhan kode yang terdapat berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;search-bar.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan terlihat seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div id=&quot;search-container&quot; class=&quot;search-container&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;input placeholder=&quot;Search football club&quot; id=&quot;searchElement&quot; type=&quot;search&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;button id=&quot;searchButtonElement&quot; type=&quot;submit&quot;&amp;gt;Search&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchButtonElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;click&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu di akhir berkasnya, jangan lupa untuk definisikan custom element yang kita buat agar dapat digunakan pada DOM.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div id=&quot;search-container&quot; class=&quot;search-container&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;input placeholder=&quot;Search football club&quot; id=&quot;searchElement&quot; type=&quot;search&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;button id=&quot;searchButtonElement&quot; type=&quot;submit&quot;&amp;gt;Search&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchButtonElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;click&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Yeay, pembuatan custom element sudah selesai. Sekarang saatnya kita menggunakannya! Pertama ubahlah struktur html yang membentuk komponen pencarian dengan menggunakan tag&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;search-bar&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Silakan buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;index.html&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kemudian ubah kode berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;div&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-container&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-container&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;input&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;placeholder&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Search football club&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;searchElement&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;button&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;searchButtonElement&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;submit&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;Search&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Menjadi seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;search-bar&amp;gt;&amp;lt;/search-bar&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah itu, buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; script -&amp;gt; view -&amp;gt; main.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan sesuaikan kode binding elemen berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; searchElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan mengubah selector-nya menjadi “&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;search-bar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;”.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; searchElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu kita tidak membutuhkan deklarasi variabel&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;buttonSearchElement&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;karena sekarang kita dapat mengakses button pada komponen pencarian melalui&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;searchElement&lt;/span&gt;&lt;/span&gt;. Jadi silakan hapus deklarasi variabel berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; buttonSearchElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchButtonElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian kita sesuaikan kembali penerapan event click pada komponen pencarian dengan mengubah kode berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;buttonSearchElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;click&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; onButtonSearchClicked&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Menjadi:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;searchElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clickEvent &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; onButtonSearchClicked&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Terakhir, karena berkas main.js perlu kode pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;search-bar.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tereksekusi, kita lakukan impor berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;search-bar.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;main.js&lt;/em&gt;&lt;/span&gt;, seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;../component/search-bar.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Tuliskan kode tersebut pada awal berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;main.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, sehingga keseluruhan kode pada berkasnya akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;../component/search-bar.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;../data/data-source.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; main &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; searchElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubListElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#clubList&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; onButtonSearchClicked &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;await&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;searchClub&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;searchElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;renderResult&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fallbackResult&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; renderResult &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; results &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;results&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; fanArt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; description &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;div&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;class&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img class=&quot;fan-art-club&quot; src=&quot;${fanArt}&quot; alt=&quot;Fan Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; fallbackResult &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; message &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2 class=&quot;placeholder&quot;&amp;gt;${message}&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;searchElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clickEvent &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; onButtonSearchClicked&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian coba kita buka proyeknya menggunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;local server&lt;/em&gt;&amp;nbsp;kemudian lakukan pencarian dengan menggunakan kata kunci “Arsenal”. &amp;nbsp;Hasilnya adalah tampilan berikut:&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003102009124b6eec15399d963670bbeffeecf30a42.png&quot; height=&quot;633&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003102009124b6eec15399d963670bbeffeecf30a42.png&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 2rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Solution: Membuat club-list dan club-item Component&lt;/h2&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Custom element selanjutnya yang perlu kita buat adalah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-list&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-item&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Masih ingat mengenai&amp;nbsp;&lt;a href=&quot;https://www.dicoding.com/academies/163/tutorials/7008&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;Nested Custom Element&lt;/a&gt;? Nah dalam membuat kedua custom element ini kita akan menggunakan custom element di dalam custom element. Atau biasa disebut dengan&amp;nbsp;nested custom element.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Mari kita awali dengan membuat dua berkas JavaScript baru dengan nama “&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;club-list.js&lt;/em&gt;&lt;/span&gt;” dan “&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;club-item.js&lt;/em&gt;&lt;/span&gt;” pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; script -&amp;gt; component&lt;/em&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Membuat &amp;lt;club-list&amp;gt; element&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Langkah pertama kita buat custom element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-list&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;terlebih dahulu. Pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;club-list.js&lt;/em&gt;&lt;/span&gt;, kita buat class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;ClubList&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan mewarisi sifat&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;HTMLElement&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;  &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian kita buat 2 (dua) fungsi di dalamnya yaitu&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;setter&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;clubs&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;set clubs&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;digunakan untuk menetapkan properti&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this._clubs&lt;/span&gt;&amp;nbsp;pada class ini. Nantinya properti tersebut akan digunakan pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dalam membuat custom element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-item&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clubs &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian di dalam fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kita lakukan proses perulangan dengan menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;forEach&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this._clubs.&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;Pada setiap iterasinya kita akan mendapatkan individual club dan pada saat itu juga kita buat custom element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-item&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Pada tiap elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-item&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dibuat sebagai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;child&lt;/em&gt;&amp;nbsp;dari element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-list&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;ini. Hasilnya. fungsi render akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;clubItemElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Perlu satu fungsi lagi pada custom element ini, yaitu fungsi untuk menangani ketika hasil pencarian mengalami kegagalan atau tidak ditemukkan. Maka dari itu mari kita buat fungsi dengan nama&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;renderError()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan satu buah parameter yang merupakan pesan eror/alasan yang perlu ditampilkan.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;renderError&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk template html yang akan ditampilkan, kita dapat copy dari fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;fallbackResult&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; script -&amp;gt; view -&amp;gt; main.js&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2 class=&quot;placeholder&quot;&amp;gt;${message}&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu paste pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;renderError()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan ubah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;clubListElement.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;this.innerHTML&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;renderError&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2 class=&quot;placeholder&quot;&amp;gt;${message}&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada akhir berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;club-list.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;jangan lupa untuk definisikan custom element yang kita buat agar dapat digunakan pada DOM.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Oh ya! Karena pada berkas ini kita menggunakan elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-item&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang nanti akan dituliskan pada berkas club-item.js, maka kita perlu melakukan impor berkas club-item.js di berkas ini.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./club-item.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sehingga sekarang keseluruhan kode yang terdapat pada berkas ini akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./club-item.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clubs &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;renderError&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2 class=&quot;placeholder&quot;&amp;gt;${message}&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;clubItemElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pembuatan element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-list&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;selesai! Sekarang kita lanjut dengan membuat elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-item&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Membuat &amp;lt;club-item&amp;gt; element&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada berkas club-item.js, kita buat class ClubItem dengan mewarisi sifat HTMLElement.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian kita buat fungsi&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;setter&lt;/em&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;club&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Fungsi setter club berfungsi untuk menetapkan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;club&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;ke properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this._club&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang nantinya akan digunakan pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk menampilkan data individual club hasil pencarian. Sehingga kita sesuaikan kode di dalam fungsi&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;setter&lt;/em&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;club&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu kita&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;copy&lt;/em&gt;&amp;nbsp;template html yang berada pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;renderResult&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; script -&amp;gt; view -&amp;gt; main.js&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img class=&quot;fan-art-club&quot; src=&quot;${fanArt}&quot; alt=&quot;Fan Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h2&amp;gt;${name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;p&amp;gt;${description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           &amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian paste template html pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;melalui fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img class=&quot;fan-art-club&quot; src=&quot;${fanArt}&quot; alt=&quot;Fan Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu kita sesuaikan kembali properti-properti yang digunakan pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;html template&lt;/em&gt;, menjadi seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img class=&quot;fan-art-club&quot; src=&quot;${this._club.fanArt}&quot; alt=&quot;Fan Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${this._club.name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${this._club.description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Karena pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this._club&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;inilah properti dari objek club disimpan.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian pada akhir berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;club-item.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;jangan lupa untuk definisikan custom element yang kita buat agar dapat digunakan pada DOM.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img class=&quot;fan-art-club&quot; src=&quot;${this._club.fanArt}&quot; alt=&quot;Fan Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${this._club.name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${this._club.description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan begitu elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-item&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sudah siap digunakan.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Menggunakan &amp;lt;club-list&amp;gt; element&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah membuat kedua custom element yang dibutuhkan, sekarang saatnya kita menggunakannya!&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Silakan buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;index.html&lt;/em&gt;&lt;/span&gt;, kemudian ubah penerapan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;club list&lt;/em&gt;&amp;nbsp;menggunakan elemen&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;lt;div&amp;gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;div&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;clubList&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Menjadi:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;club-list&amp;gt;&amp;lt;/club-list&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Selanjutnya buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; script -&amp;gt; view -&amp;gt; main.js&lt;/em&gt;&lt;/span&gt;. Kita sesuaikan kembali selector pada saat melakukan binding&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;clubListElement&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Ubah kode berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubListElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#clubList&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Menjadi:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubListElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu kita sesuaikan juga kode yang terdapat di dalam fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;renderResult&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Hapus seluruh logika yang ada di dalam fungsi tersebut.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; renderResult &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; results &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;results&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; fanArt&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; description &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;clubElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;div&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;setAttribute&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;class&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img class=&quot;fan-art-club&quot; src=&quot;${fanArt}&quot; alt=&quot;Fan Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita cukup menggantinya dengan seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; renderResult &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; results &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubs &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; results&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sesuaikan juga kode yang terdapat pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;fallbackResult&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, karena kita sudah membuat fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;renderError()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;ClubList&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, maka penggunaanya cukup dilakukan seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; fallbackResult &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; message &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;renderError&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Karena kita menggunakan elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;club-list&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;main.js&lt;/em&gt;&lt;/span&gt;, maka kita perlu melakukan impor berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;club-list.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;main.js&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;../component/club-list.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan begitu keseluruhan kode pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;main.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan tampak seperti berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;../component/club-list.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;../component/search-bar.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;../data/data-source.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;main &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;searchElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;clubListElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;onButtonSearchClicked &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;result &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;await&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;DataSource&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;searchClub&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;searchElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;renderResult&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fallbackResult&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;renderResult &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; results &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubs &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; results&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;fallbackResult &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; message &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;renderError&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;searchElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clickEvent &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; onButtonSearchClicked&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; main&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sekarang kita coba buka proyeknya menggunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;local server&lt;/em&gt;&amp;nbsp;lalu tekan tombol pencarian. Voila, inilah tampilan hasilnya:&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003102031456392a6f8c00cbb02e2dc53ed846c7d2a.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003102031456392a6f8c00cbb02e2dc53ed846c7d2a.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Ops, tampilan daftar club tampak berantakan. Kita perlu menyesuaikan styling-nya juga. Jadi silakan buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; style -&amp;gt; clublist.css&lt;/em&gt;&lt;/span&gt;. Kemudian ubah seluruh selector&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;#clubList&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;club-list&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;dan selector&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;.club&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;club-item&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;list &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;32px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;list &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;placeholder &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; lighter&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;moz&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;ms&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;18px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;8px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;radius&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;overflow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hidden&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fan&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;art&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;max&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;300px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; cover&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; center&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;24px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; h2 &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; lighter&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; p &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;overflow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hidden&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;text&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; ellipsis&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;orient&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; vertical&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clamp&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* number of lines to show */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian tambahkan juga properti display dengan nilai block pada selector&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;club-list&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;club-item&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;list &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;….&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;….&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;….&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;….&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sehingga keseluruhan kode pada berkas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;clublist.css&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&amp;nbsp;akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;list &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;32px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;list&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;placeholder &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; lighter&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;moz&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;ms&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;18px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;8px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;radius&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;overflow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hidden&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fan&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;art&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;max&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;300px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; cover&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; center&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;24px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;h2&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; lighter&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;p&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;overflow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hidden&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;text&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; ellipsis&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;orient&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; vertical&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clamp&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* number of lines to show */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sekarang kita coba buka kembali proyek club finder dengan menggunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;local server&lt;/em&gt;. Seharusnya kini semuanya sudah berjalan dengan baik.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200310203504226e0e544df5e8e4b9b389c9fa9f3f0c.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200310203504226e0e544df5e8e4b9b389c9fa9f3f0c.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Langkah dari ketiga solution ini bisa Anda temukan juga pada repository berikut:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;https://github.com/dicodingacademy/a163-bfwd-labs/tree/109-club-finder-custom-element-solution&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Shadow DOM&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Menerapkan Shadow DOM pada Proyek Club Finder&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita mulai dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;lt;app-bar&amp;gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;component yuk. Pertama kita buka dulu proyek club finder dengan text editor yang kita gunakan.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313095904249af3ba1d687f1216c8dc44d5fa11fc.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313095904249af3ba1d687f1216c8dc44d5fa11fc.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;script -&amp;gt; component -&amp;gt; app-bar.js&lt;/em&gt;&lt;/span&gt;, buat constructor dari class tersebut dan di dalamnya kita tetapkan shadow root seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2&amp;gt;Club Finder&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;app-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Karena kita sudah menerapkan Shadow DOM pada AppBar, jangan lupa pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kita ubah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.shadowDOM.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2&amp;gt;Club Finder&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;app-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;style -&amp;gt; appbar.css&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan pindahkan (&lt;em style=&quot;box-sizing: border-box;&quot;&gt;cut&lt;/em&gt;) seluruh kode yang ada pada berkas tersebut.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;app&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;background&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; cornflowerblue&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; white&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;8px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu tempel (paste) pada nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.shadowDOM.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan dibungkus oleh element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tepat sebelum element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;app-bar.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;app-bar {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display: block;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;padding: 16px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width: 100%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;background-color: cornflowerblue;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;color: white;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;Club Finder&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;app-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Coba kita simpan perubahan yang diterapkan kemudian lihat perubahannya pada browser.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003131025191a8dcdd75e697b30cba119d06defa3e1.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003131025191a8dcdd75e697b30cba119d06defa3e1.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Ups, pada browser kita dapat melihat title yang ditampilkan pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;app-bar&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tampak berantakan. Untuk menanganinya, kita perlu menyesuaikan kembali style yang diterapkan pada custom element menjadi seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin: 0;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;padding: 0;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;box-sizing: border-box;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:host {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display: block;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width: 100%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;background-color: cornflowerblue;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;color: white;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;h2 {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;padding: 16px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;Club Finder&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;app-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;AppBar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada perubahan styling tersebut kita menambahkan&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;sizing&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Yang digunakan untuk menghilangkan seluruh margin dan padding standar yang diterapkan pada element html. Dan kita juga mengubah pengaturan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;box-sizing&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;border-box&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu kode pada kode styling lainnya juga kita melihat bahwa selector app-bar digantikan dengan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;:host&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Apa itu&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;:host&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;? Selector&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;:host&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan selector yang digunakan untuk menunjuk element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;:host&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang menerapkan Shadow DOM. Pada host kita tidak dapat mengatur padding sehingga kita perlu memindahkannya pada elemen&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah melakukan perubahan tersebut simpan (&lt;em style=&quot;box-sizing: border-box;&quot;&gt;save&lt;/em&gt;) kembali perubahannya dan lihat hasilnya pada browser, seharusnya&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;app-bar&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sudah ditampilkan dengan baik.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313102750873f1782c7d560202cb13b08a7eb95ea.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313102750873f1782c7d560202cb13b08a7eb95ea.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Karena kita sudah tidak membutuhkan lagi berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; styles -&amp;gt; appbar.css&lt;/em&gt;&lt;/span&gt;, kita dapat menghapus berkas tersebut.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313102817f716d852a60606d8028fd6f20b702380.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313102817f716d852a60606d8028fd6f20b702380.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top; width: 300px;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jangan lupa untuk menghapus import css tersebut pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; styles -&amp;gt; style.css&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;@import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;clublist.css&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;@import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;searchbar.css&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;sizing&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;body&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;family&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; sans&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;serif&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;main&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;max&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;800px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;32px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/h3&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Menerapkan Shadow DOM pada Search Bar&lt;/h3&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah berhasil menerapkan Shadow DOM pada App Bar, selanjutnya kita terapkan Shadow DOM pada search bar. Silakan buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;src -&amp;gt; script -&amp;gt; component -&amp;gt; search-bar.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kemudian buat constructor dan terapkan Shadow DOM di dalamnya.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div id=&quot;search-container&quot; class=&quot;search-container&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;input placeholder=&quot;Search football club&quot; id=&quot;searchElement&quot; type=&quot;search&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;button id=&quot;searchButtonElement&quot; type=&quot;submit&quot;&amp;gt;Search&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchButtonElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;click&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sama seperti yang kita lakukan pada component App Bar, kita ubah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.shadowDOM.InnerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;connectedCallback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;event&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div id=&quot;search-container&quot; class=&quot;search-container&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;input placeholder=&quot;Search football club&quot; id=&quot;searchElement&quot; type=&quot;search&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;button id=&quot;searchButtonElement&quot; type=&quot;submit&quot;&amp;gt;Search&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchButtonElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;click&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Selain itu juga kita ubah pemanggilan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.querySelector&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.shadowDOM.querySelector&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;get value()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;..........&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.........&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;querySelector&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;#searchButtonElement&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;).&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;click&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clickEvent&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;...........&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; styles -&amp;gt; searchbar.css&lt;/em&gt;&lt;/span&gt;, pindahkan (&lt;em style=&quot;box-sizing: border-box;&quot;&gt;cut&lt;/em&gt;) seluruh kode yang terdapat pada berkas tersebut.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;container &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;max&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;800px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;8px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;radius&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; flex&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;position&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; sticky&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;top&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;background&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; white&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;container &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;input&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;75&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;1px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;solid cornflowerblue&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; bold&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;container &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;input&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;focus &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;outline&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;2px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;solid cornflowerblue&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;container &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;input&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;focus&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;placeholder &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; bold&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;container &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &amp;nbsp;input&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;placeholder &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; cornflowerblue&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; normal&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;container &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;button&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;23&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;cursor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; pointer&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;background&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; cornflowerblue&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; white&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;text&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;transform&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; uppercase&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;@media&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;screen &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;and&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;max&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;550px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;container &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;flex&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;direction&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; column&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;position&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;container &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;input&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;12px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;container &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;button&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu tempel (paste) pada nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.shadowDOM.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan dibungkus oleh element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tepat sebelum element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;div&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;search-bar.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.........&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;   render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;       &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       &amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       .search-container {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           max-width: 800px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           padding: 16px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           border-radius: 5px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           display: flex;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           position: sticky;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           top: 10px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           background-color: white;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       }&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;      &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       .search-container &amp;gt; input {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           width: 75%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           padding: 16px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           border: 0;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           border-bottom: 1px solid cornflowerblue;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           font-weight: bold;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       }&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;      &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       .search-container &amp;gt; input:focus {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           outline: 0;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           border-bottom: 2px solid cornflowerblue;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       }&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;      &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       .search-container &amp;gt; input:focus::placeholder {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           font-weight: bold;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       }&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;      &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       .search-container &amp;gt;  input::placeholder {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           color: cornflowerblue;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           font-weight: normal;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       }&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;      &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       .search-container &amp;gt; button {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           width: 23%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           cursor: pointer;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           margin-left: auto;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           padding: 16px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           background-color: cornflowerblue;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           color: white;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           border: 0;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           text-transform: uppercase;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       }&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;      &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       @media screen and (max-width: 550px){&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           .search-container {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;               flex-direction: column;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;               position: static;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           }&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;      &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           .search-container &amp;gt; input {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;               width: 100%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;               margin-bottom: 12px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           }&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;      &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           .search-container &amp;gt; button {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;               width: 100%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           }&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       }&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       &amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       &amp;lt;div id=&quot;search-container&quot; class=&quot;search-container&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           &amp;lt;input placeholder=&quot;Search football club&quot; id=&quot;searchElement&quot; type=&quot;search&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;           &amp;lt;button id=&quot;searchButtonElement&quot; type=&quot;submit&quot;&amp;gt;Search&amp;lt;/button&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;       `&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.......&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;   &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;search-bar&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;SearchBar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Simpan perubahan yang dilakukan kemudian lihat hasilnya pada browser.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003131034259aa04d43b00877a7efd968c647ba2ae0.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003131034259aa04d43b00877a7efd968c647ba2ae0.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Komponen Search Bar tampak normal dan berfungsi dengan baik sehingga kita tidak perlu menyesuaikan lagi styling-nya.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Karena kita sudah tidak membutuhkan lagi berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; styles -&amp;gt; searchbar.css&lt;/em&gt;&lt;/span&gt;, kita dapat menghapus berkas tersebut.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313103452d010492337b319b09b72b75402e29540.png&quot; class=&quot;fr-fic fr-dib fr-fil&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313103452d010492337b319b09b72b75402e29540.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto 5px 0px; max-width: 100%; position: relative; vertical-align: top; width: 300px;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jangan lupa untuk menghapus import css tersebut pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; styles -&amp;gt; style.css&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;@import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;clublist.css&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;sizing&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;body&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;family&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; sans&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;serif&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;main&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;max&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;800px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;32px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Menerapkan Shadow DOM pada Club List dan Club Item&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Terakhir kita terapkan Shadow DOM pada komponen club list dan club item. Silakan buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; script -&amp;gt; component -&amp;gt; club-list.js&lt;/em&gt;&lt;/span&gt;, kemudian buat constructor dan terapkan Shadow DOM di dalamnya.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./club-item.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clubs &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;renderError&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2 class=&quot;placeholder&quot;&amp;gt;${message}&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;clubItemElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian ubah seluruh kode&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.shadowDOM.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.appendChild&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.shadowDOM.appendChild&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./club-item.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clubs &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;renderError&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2 class=&quot;placeholder&quot;&amp;gt;${message}&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;clubItemElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian buka berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; styles -&amp;gt; clublist.css&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan pindahkan (&lt;em style=&quot;box-sizing: border-box;&quot;&gt;cut&lt;/em&gt;) kode styling dengan selector&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;club-list &amp;gt; .placeholder&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;list &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;placeholder &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;lighter&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.5&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;moz&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;ms&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;user&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;none&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lalu tempel (&lt;em style=&quot;box-sizing: border-box;&quot;&gt;paste&lt;/em&gt;) pada nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.shadowDOM.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan dibungkus oleh element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tepat sebelum element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;renderError()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;club-list.js&lt;/em&gt;&lt;/span&gt;&amp;nbsp;seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./club-item.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.........&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;renderError&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;club-list &amp;gt; .placeholder {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-weight: lighter;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;color: rgba(0,0,0,0.5);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-user-select: none;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-moz-user-select: none;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-ms-user-select: none;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;user-select: none;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2 class=&quot;placeholder&quot;&amp;gt;${message}&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.......&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Hapus&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;child selector&lt;/em&gt;&amp;nbsp;(&amp;gt;) beserta kombinatornya, sisakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;.placeholder&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sebagai selector dari&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;styling&lt;/em&gt;&amp;nbsp;tersebut. Sehingga kode pada berkas ini seluruhnya tampak seperti:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;./club-item.js&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clubs &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;renderError&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;message&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.placeholder {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-weight: lighter;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;color: rgba(0,0,0,0.5);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-user-select: none;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-moz-user-select: none;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-ms-user-select: none;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;user-select: none;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&amp;lt;h2 class=&quot;placeholder&quot;&amp;gt;${message}&amp;lt;/h2&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_clubs&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;clubItemElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;clubItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clubItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubList&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Simpan perubahan tersebut dan lihat hasilnya pada browser, tampilan dari daftar club akan sangat berantakan.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003131040024f3e1630a04c7004c7c638df8dbe006e.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003131040024f3e1630a04c7004c7c638df8dbe006e.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Tenang kita akan memperbaikinya dengan beranjak ke berkas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;src -&amp;gt; script -&amp;gt; component -&amp;gt; club-item.js&lt;/span&gt;&lt;/em&gt;.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada berkas tersebut buat sebuah&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;constructor&lt;/em&gt;&amp;nbsp;dan terapkan Shadow DOM di dalamnya.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img class=&quot;fan-art-club&quot; src=&quot;${this._club.fanArt}&quot; alt=&quot;Fan Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${this._club.name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${this._club.description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Seperti biasa jangan lupa untuk mengubah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;menjadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.shadowDOM.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;ya.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;attachShadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;({&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;open&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img class=&quot;fan-art-club&quot; src=&quot;${this._club.fanArt}&quot; alt=&quot;Fan Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${this._club.name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${this._club.description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;club-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Selanjutnya buka kembali berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; styles -&amp;gt; clublist.css&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan pindahkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;styling&lt;/em&gt;&amp;nbsp;berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;18px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;8px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;radius&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;overflow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hidden&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fan&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;art&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;max&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;300px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; cover&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; center&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;24px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;h2&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; lighter&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;p&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;overflow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hidden&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;text&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; ellipsis&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;orient&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; vertical&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;webkit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;line&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;clamp&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* number of lines to show */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Tempel pada nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this.shadowDOM.innerHTML&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan dibungkus oleh element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tepat sebelum element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;img&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di berkas&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;club-item.js&lt;/em&gt;&amp;nbsp;seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.......&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;club-item {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display: block;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin-bottom:&amp;nbsp;18px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;box-shadow:&amp;nbsp;0&amp;nbsp;4px&amp;nbsp;8px&amp;nbsp;0&amp;nbsp;rgba(0, 0, 0, 0.2);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;border-radius:&amp;nbsp;10px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;overflow: hidden;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;club-item&amp;nbsp;.fan-art-club {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width:&amp;nbsp;100%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;max-height:&amp;nbsp;300px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;object-fit: cover;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;object-position: center;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.club-info {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;padding:&amp;nbsp;24px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.club-info &amp;gt;&amp;nbsp;h2&amp;nbsp;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-weight: lighter;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.club-info &amp;gt;&amp;nbsp;p&amp;nbsp;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin-top:&amp;nbsp;10px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;overflow: hidden;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;text-overflow: ellipsis;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display: -webkit-box;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-box-orient: vertical;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-line-clamp:&amp;nbsp;10;&amp;nbsp;/* number of lines to show */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img&amp;nbsp;class=&quot;fan-art-club&quot;&amp;nbsp;src=&quot;${this._club.fanArt}&quot;&amp;nbsp;alt=&quot;Fan&amp;nbsp;Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div&amp;nbsp;class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${this._club.name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${this._club.description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;......&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sesuaikan kembali selector pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;styling&lt;/em&gt;&amp;nbsp;tersebut menjadi seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ClubItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.....&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadowDOM&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;* {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin:&amp;nbsp;0;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;padding:&amp;nbsp;0;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;box-sizing: border-box;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:host {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display: block;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin-bottom:&amp;nbsp;18px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;box-shadow:&amp;nbsp;0&amp;nbsp;4px&amp;nbsp;8px&amp;nbsp;0&amp;nbsp;rgba(0, 0, 0, 0.2);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;border-radius:&amp;nbsp;10px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;overflow: hidden;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.fan-art-club {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width:&amp;nbsp;100%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;max-height:&amp;nbsp;300px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;object-fit: cover;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;object-position: center;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.club-info {&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;padding:&amp;nbsp;24px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.club-info &amp;gt;&amp;nbsp;h2&amp;nbsp;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;font-weight: lighter;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.club-info &amp;gt;&amp;nbsp;p&amp;nbsp;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;margin-top:&amp;nbsp;10px;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;overflow: hidden;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;text-overflow: ellipsis;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;display: -webkit-box;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-box-orient: vertical;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-webkit-line-clamp:&amp;nbsp;10;&amp;nbsp;/* number of lines to show */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;img&amp;nbsp;class=&quot;fan-art-club&quot;&amp;nbsp;src=&quot;${this._club.fanArt}&quot;&amp;nbsp;alt=&quot;Fan&amp;nbsp;Art&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;div&amp;nbsp;class=&quot;club-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;h2&amp;gt;${this._club.name}&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;p&amp;gt;${this._club.description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/div&amp;gt;`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;........&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Simpan perubahan tersebut dan lihat pada browser, seharusnya tampilan daftar tim sudah kembali normal.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003131046287ce90b85747ab537976360b93f4a2da2.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003131046287ce90b85747ab537976360b93f4a2da2.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Oh ya, sebelum beranjak kita buka kembali berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; styles -&amp;gt; clublist.css&lt;/em&gt;&lt;/span&gt;. Di sana masih terdapat satu rule styling berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;list &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;32px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jangan hapus rule styling tersebut karena kita masih menggunakannya untuk mengatur jarak daftar liga yang ditampilkan. Namun sebaiknya kita pindahkan rule styling tersebut pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;src -&amp;gt; styles -&amp;gt; style.css&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;@import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;clublist.css&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;sizing&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;body&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;font&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;family&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; sans&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;serif&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;main&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;90&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;max&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;800px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;32px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;club&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;list&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;32px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan begitu kita dapat leluasa menghapus berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;clublist.css&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan menghapus&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;@import&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada berkas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;style.css&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200313104746dc2f4116f225f458ab6541ca396d2223.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200313104746dc2f4116f225f458ab6541ca396d2223.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Selamat! Kita sudah berhasil menerapkan Shadow DOM pada seluruh custom element yang digunakan di proyek Club Finder. Sampai ketemu di materi selanjutnya ya!&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Langkah dari solution ini bisa Anda temukan juga pada repository berikut:&amp;nbsp;&lt;a href=&quot;https://github.com/dicodingacademy/a163-bfwd-labs/tree/110-club-finder-shadow-dom-solution&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;https://github.com/dicodingacademy/a163-bfwd-labs/tree/110-club-finder-shadow-dom-solution&lt;/a&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/1537063948357209489'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/1537063948357209489'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/belajar-membuat-custom-element-dan.html' title='Belajar Membuat Custom Element Dan Shadow DOM Dasar di Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-2294800958505688350</id><published>2020-04-28T19:13:00.000+07:00</published><updated>2020-11-27T21:02:34.970+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Contoh Nested Custom Element Di Javascript</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Ketika menggunakan custom element, mungkin terdapat keadaan di mana kita membutuhkan custom element berada di dalam custom element lain. Contohnya, banyak website saat ini yang menampilkan data berupa list, entah itu daftar artikel ataupun item belanja.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Biasanya setiap daftar yang ditampilkan ditampung dalam sebuah container&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&amp;lt;div&amp;gt;&lt;/span&gt;&lt;/em&gt;. Kemudian item yang sama ditampilkan secara berulang dengan data yang berbeda pada container tersebut.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200310191307a4fe82d6dd70b4daae920036121ba5c4.gif&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200310191307a4fe82d6dd70b4daae920036121ba5c4.gif&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Web component dapat memudahkan dalam mengorganisir daftar item yang ditampilkan dalam bentuk list menggunakan container. Caranya kita membuat dua custom element yatu&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;container&lt;/em&gt;, dan itemnya.&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Container&lt;/em&gt;&amp;nbsp;digunakan untuk menampung elemen item di dalamnya. Selain itu pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;container&lt;/em&gt;&amp;nbsp;juga data (array) diberikan. Nantinya&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;container&lt;/em&gt;-lah yang akan membuat elemen item di dalamnya berdasarkan data yang diberikan.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Belum terbayang seperti apa? Berikut &lt;a href=&quot;https://repl.it/@dicodingacademy/163-03-nested-custom-element?lite=true&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;contohnya&lt;/a&gt;:&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7008?from=7001#tab1-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;index.html&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;dec&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;meta&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;charset&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;utf-8&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;meta&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;viewport&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;width=device-width&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;title&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;repl.it&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;link&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;style.css&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;text/css&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;script&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;script.js&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;atn&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;atv&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;module&quot;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;tag&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7008?from=7001#tab1-code2&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;script.js&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code2&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./article-list.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;articles&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./articles.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;articleListElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;article-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;articleListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;articles &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;articleListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7008?from=7001#tab1-code3&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;article-list.js&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code3&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./article-item.js&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ArticleList&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_articles &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;article &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;articleItemElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;article-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// memanggil fungsi setter article() pada article-item.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;articleItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;article &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;articleItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;article-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ArticleList&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7008?from=7001#tab1-code4&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;article-item.js&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;false&quot; class=&quot;nav-link show&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7008?from=7001#tab1-code5&quot; role=&quot;tab&quot; style=&quot;background-color: transparent; border-radius: 0.25rem; box-sizing: border-box; color: rgb(48, 48, 48) !important; display: block; padding: 0.5rem; text-decoration-line: none;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code4&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ArticleItem&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;HTMLElement&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_article &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;innerHTML &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;img class=&quot;featured-image&quot; src=&quot;${this._article.featuredImage}&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;article-info&quot;&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;h2&amp;gt;&amp;lt;a href=&quot;${this._article.id}&quot;&amp;gt;${this._article.title}&amp;lt;/a&amp;gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;p&amp;gt;${this._article.description}&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&amp;nbsp; `&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;customElements&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;define&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;article-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ArticleItem&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7008?from=7001#tab1-code5&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;articles.js&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;false&quot; class=&quot;nav-link show&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7008?from=7001#tab1-code6&quot; role=&quot;tab&quot; style=&quot;background-color: transparent; border-radius: 0.25rem; box-sizing: border-box; color: rgb(48, 48, 48) !important; display: block; padding: 0.5rem; text-decoration-line: none;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code5&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; articles &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;title&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Lorem Ipsum Dolor&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;featuredImage&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://i.picsum.photos/id/204/536/354.jpg&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;description&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;title&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Lorem Ipsum Dolor&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;featuredImage&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://i.picsum.photos/id/209/536/354.jpg&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;description&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;title&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Lorem Ipsum Dolor&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;featuredImage&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://i.picsum.photos/id/206/536/354.jpg&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;description&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;id&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;title&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Lorem Ipsum Dolor&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;featuredImage&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;https://i.picsum.photos/id/212/536/354.jpg&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;description&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#39;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;export&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/7008?from=7001#tab1-code6&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;style.css&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code6&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;sizing&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; body &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;16px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;list &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; max&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;800px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; display&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; block&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;18px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; box&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;shadow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;8px&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; rgba&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;0.2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; border&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;radius&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; overflow&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hidden&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;featured&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;image &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; width&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;%;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; max&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;300px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;fit&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; cover&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;object&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; center&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; padding&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;24px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;item &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; p &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; margin&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;10px&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Pada kode di atas kita bisa melihat bahwa terdapat dua buah custom component yaitu&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;article-list&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;article-item&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;article-list.js&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;terdapat fungsi&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;setter&lt;/em&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;articles&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;yang berfungsi untuk menyimpan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;articles&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this._articles&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_articles &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Kemudian properti tersebut digunakan pada fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;render()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk ditampilkan satu persatu melalui&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;article-item&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;article &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;articleItemElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;article-item&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// memanggil fungsi setter article() pada article-item.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;articleItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;article &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; article&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;articleItemElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Dengan begitu, untuk menampilkan data pada&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;script.js&amp;nbsp;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;akan lebih mudah. Kita tidak perlu melakukan proses perulangan lagi di sana karena proses tersebut langsung dilakukan ketika menggunakan element&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&amp;lt;article-list&amp;gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Kita cukup memberikan nilai array yang akan ditampilkan.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./article-list.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; articles &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;./articles.js&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; articleListElement &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;createElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;article-list&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;articleListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;articles &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; articles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;document&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;appendChild&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;articleListElement&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Semakin mudah kita menggunakan sebuah element maka akan semakin baik bukan? Walaupun terlihat agak sedikit merepotkan dalam membuatnya, perlu Anda ingat bahwa &amp;nbsp;web component ini bersifat reusable. Artinya, jika kita ingin membuat komponen serupa, kita tidak perlu membuatnya dari awal.&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Dengan menjalankan kode di atas, maka hasilnya akan tampak seperti ini:&lt;/div&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;202003101921481bcb54550f43e9958256358a3c73709b.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/202003101921481bcb54550f43e9958256358a3c73709b.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/2294800958505688350'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/2294800958505688350'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/contoh-nested-custom-element-di.html' title='Contoh Nested Custom Element Di Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-3631468092225790268</id><published>2020-04-28T00:37:00.000+07:00</published><updated>2020-11-27T21:02:35.037+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Cara Membuat Callback Function di Javascript</title><content type='html'>&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Hal yang membuat bingung ketika kita bekerja dengan synchronous dan asynchronous program adalah bagaimana menangani suatu nilai yang didapatkan secara asynchronous pada program yang berjalan secara synchronous.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Contohnya seperti kode berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; getCake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;let&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Sedang membuat kue, silakan tunggu ....&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;setTimeout&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Kue Selesai!&quot;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;3000&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; getCake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/*output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Sedang membuat kue, silakan tunggu ....&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;null&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika kita melakukan hal seperti ini untuk mencetak nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;cake&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang sesungguhnya, maka hal tersebut tidak akan pernah terjadi. Karena seperti yang sudah kita ketahui fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;setTimeout()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tidak akan menghentikan JavaScript untuk mengeksekusi kode yang ada selanjutnya. Jadi fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;getCake()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan selalu mengembalikan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;null&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, karena kode&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;return cake&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan dieksekusi terlebih dahulu dibandingkan dengan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;cake = “Kue Selesai!”&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Kode asynchronous perlu disusun dengan cara yang berbeda dari synchronous code. Cara paling dasar adalah dengan menggunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;callback function&lt;/em&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Apa itu&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;callback function&lt;/em&gt;? Mari kita bayangkan kembali melalui pandangan dunia nyata. Kita menunggu pesanan kopi datang di meja kita tapi , pada saat itu juga kita tidak bisa berada terus di tempat itu karena ada urusan mendadak. Pada kasus ini mungkin terdapat dua aksi yang bisa kita lakukan:&lt;/div&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;(Synchronous) Kita tetap menunggu di meja hingga kopi itu datang dan kemudian meninggalkan kedai kopi.&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;(Asynchronous) Kita meminta tolong kepada teman kita untuk menerima kopi itu, dan bertemu nanti untuk memberikan kopinya. Sehingga kita tidak perlu menunggu untuk meninggalkan kedai kopi.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Nah pada JavaScript, teman kita berperan layaknya&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;callback function&lt;/em&gt;. Ia diperintahkan pada sebuah fungsi asynchronous kemudian akan dipanggil/digunakan ketika tugas itu selesai.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Bagaimana cara melakukannya? Yang pertama kita tambahkan parameter dengan nama callback pada fungsi asynchronous.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; getCake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; callback &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;let&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Sedang membuat kue, silakan tunggu ....&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;setTimeout&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Kue Selesai!&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;3000&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian kita panggil/gunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;callback&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang diisikan dengan data yang akan dibawa (cake) ketika task selesai dilakukan.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Kue Selesai!&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;callback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;3000&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah menggunakan callback, fungsi tidak perlu lagi mengembalikan nilai. Sehingga kita bisa hapus kode&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;return cake;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Sehingga keseluruhan fungsi akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; getCake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; callback &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;let&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Sedang membuat kue, silakan tunggu ....&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;setTimeout&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Kue Selesai!&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;callback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;3000&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian untuk menggunakan fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;getCake&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kita ubah kode dari:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; getCake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Menjadi:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;getCake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sehingga ketika dijalankan akan sesuai dengan harapan kita.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; getCake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; callback &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;let&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Sedang membuat kue, silakan tunggu ....&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;setTimeout&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Kue Selesai!&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;callback&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;3000&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;getCake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Sedang membuat kue, silakan tunggu ....&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;---- setelah 3 detik ----&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Kue Selesai!&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;Callback Hell&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita sudah mengetahui bahwa callback dibutuhkan untuk mendapatkan nilai yang berasal dari&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;asynchronous function&lt;/em&gt;. Lantas bagaimana jika terdapat proses satu sama lain yang saling bergantungan? Contohnya, untuk membuat kue tahapan yang perlu kita lakukan adalah:&lt;/div&gt;&lt;ol style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;Mempersiapkan bahan&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;Membuat adonan&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;Menyiapkan adonan ke cetakan&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Memanggang adonan&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Tahapan tersebut sangat tergantung satu sama lain. Kita tidak bisa memanggang adonan sebelum membuat adonannya, dan kita tidak bisa membuat adonan tanpa mempersiapkan bahannya terlebih dahulu. Jika seluruh tahapan tersebut berjalan secara&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;synchronous&lt;/em&gt;, mungkin kita bisa melakukanya seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; makeACake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(...&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;rawIngredients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;ingredients &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; gatheringIngredients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;rawIngredients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;dough &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; makeTheDough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;ingredients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;pouredDough &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; pourDough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;cake &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; bakeACake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;pourDough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;),&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun jika fungsi-fungsi tersebut berjalan secara&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;asynchronous&lt;/em&gt;, maka kita akan membuat yang namanya&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;callback hell&lt;/em&gt;. Callback hell terjadi karena banyak sekali callback function yang bersarang karena saling membutuhkan satu sama lain, sehingga kode akan tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; makeACake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(...&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;rawIngredients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;gatheringIngredients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;rawIngredients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;ingridients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;makeTheDough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;ingridients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;pourDough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;dough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;pouredDough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bakeACake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;pouredDough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;cake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;});&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Melihat kode seperti ini saja, kepala jadi pusing. Terbayang sulitnya memelihara kode ini di masa yang akan datang.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Lantas apa solusi agar kita dapat menghindari&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;callback hell&lt;/em&gt;? Salah satunya adalah dengan menggunakan Promise.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; makeACake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(...&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;rawIngredients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;gatheringIngredients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;rawIngredients&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;makeTheDough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;pourDough&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;bakeACake&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;then&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan Promise, kita dapat meminimalisir callback hell dan mengubahnya menjadi kode yang sangat mudah dibaca. Bahkan dengan kode seperti itu, non-developer pun dapat mengerti apa maksud dari kode tersebut&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/3631468092225790268'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/3631468092225790268'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/cara-membuat-callback-function-di.html' title='Cara Membuat Callback Function di Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-7993794151181793997</id><published>2020-04-28T00:06:00.000+07:00</published><updated>2020-11-27T21:02:35.101+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Cara Membuat Fungsi setTimeout didalam Javascript</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;setTimeout()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan cara yang paling mudah untuk membuat kode kita dijalankan secara asynchronous.&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;b&gt;Fungsi ini menerima dua buah parameter.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pertama adalah fungsi yang akan dijalankan secara asynchronous, dan kedua adalah nilai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;number&lt;/em&gt;&amp;nbsp;dalam&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;milisecond&lt;/em&gt;&amp;nbsp;sebagai nilai tunggu sebelum fungsi dijalankan. Contoh penggunaannya adalah seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Selamat datang!&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;setTimeout&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Terimakasih sudah mampir, silakan datang kembali!&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;3000&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ada yang bisa dibantu?&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika kita hanya mengenal program secara synchronous, maka kita dapat membayangkan hasilnya memiliki urutan sebagai berikut:&lt;/div&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;Mencetak -&amp;gt; Selamat datang!&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;Menunggu selama tiga detik&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;Mencetak -&amp;gt; Terima kasih sudah mampir, silakan datang kembali!&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Mencetak -&amp;gt; Ada yang bisa dibantu?&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun nyatanya&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;setTimeout()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tidak akan menghentikan JavaScript untuk melakukan eksekusi kode pada baris berikutnya. Sehingga urutannya menjadi seperti berikut:&lt;/div&gt;&lt;ul style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem; margin-top: 0px;&quot;&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;Mencetak -&amp;gt; Selamat datang!&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;Mencetak -&amp;gt; Ada yang bisa dibantu?&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;Menunggu selama tiga detik&lt;/li&gt;&lt;li dir=&quot;ltr&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Mencetak -&amp;gt; Terimakasih sudah mampir, silakan datang kembali!&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika kode tersebut dijalankan, maka akan menampilkan output sebagai berikut:&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200312170729f414a0fada93abd3a5d0736d14ecf72b.gif&quot; height=&quot;145&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200312170729f414a0fada93abd3a5d0736d14ecf72b.gif&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/7993794151181793997'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/7993794151181793997'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/cara-membuat-fungsi-settimeout-didalam.html' title='Cara Membuat Fungsi setTimeout didalam Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-7074637508590433356</id><published>2020-04-27T23:55:00.000+07:00</published><updated>2020-11-27T21:02:35.163+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Static Method didalam Class Javascript</title><content type='html'>&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Seluruh kendaraan pasti butuh yang namanya perawatan bukan? Jika iya, tentu kita perlu membuat method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;repair&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk memperbaiki kendaraan tersebut.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Dalam analogi dunia nyata, ketika kendaraan mengalami kerusakan maka kendaraan tersebut akan diperbaiki di bengkel (factory), sehingga kita perlu membuat class baru yang berperan sebagai factory, sebutlah class tersebut&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Di dalam kelas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;terdapat satu method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;repair()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang dapat menerima banyak kendaraan sebagai parameternya.&lt;br /&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Vehicle&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;engineActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/*&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;&amp;nbsp; kode lainnya&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;&amp;nbsp; */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* kode lainnya dalam pembuatan class Car,&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Motorcycle, dsb. */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;repair&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;vehicles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; vehicles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;vehicle &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${vehicle.licensePlate}&amp;nbsp;sedang melakukan perawatan`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk mengakses method dari class, sejauh ini kita perlu membuat instance dari classnya terlebih dahulu. Sehingga untuk memanggil&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;repair()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kita perlu membuat instance dari class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;H121S&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;tomMotor &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Motorcycle&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;GF121J&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Yamaha&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;dimasCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;TA1408K&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Tesla&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* Membuat instance untuk memanggil fungsi repair */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;vehicleFactory &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;vehicleFactory&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;repair&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; tomMotor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; dimasCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Kendaraan H121S sedang melakukan perawatan&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Kendaraan GF121J sedang melakukan perawatan&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Kendaraan TA1408K sedang melakukan perawatan&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kode tersebut berjalan sesuai harapan namun tidak efektif. Mengapa? Karena kita perlu membuat&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;instance&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk sekedar memanggil satu fungsi dari class-nya tersebut. Membuat&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;instance&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;adalah membuat sebuah objek baru yang terbentuk melalui blueprint sehingga membutuhkan memori ekstra. Jika kita dapat mengakses method tersebut tanpa melalui instance mengapa tidak? Pada kasus inilah kita membutuhkan sebuah&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;static method&lt;/em&gt;. Static method merupakan method yang tidak dapat dipanggil oleh instance dari class, namun dapat dipanggil melalui class-nya sendiri.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada ES6 class kita dapat membuat static method dengan menambahkan keyword static sebelum deklarasi method-nya:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Vehicle&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;engineActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/*&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;&amp;nbsp; kode lainnya&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;&amp;nbsp; */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* kode lainnya dalam pembuatan class Car,&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Motorcycle, dsb. */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;repair&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;vehicles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; vehicles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;vehicle &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${vehicle.licensePlate}&amp;nbsp;sedang melakukan perawatan`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian untuk memanggil methodnya kita bisa panggil melalui class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Vehicle&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kemudian&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;repair()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Seluruh kendaraan pasti butuh yang namanya perawatan bukan? Jika iya, tentu kita perlu membuat method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;repair&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk memperbaiki kendaraan tersebut. Dalam analogi dunia nyata, ketika kendaraan mengalami kerusakan maka kendaraan tersebut akan diperbaiki di bengkel (factory), sehingga kita perlu membuat class baru yang berperan sebagai factory, sebutlah class tersebut&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Di dalam kelas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;terdapat satu method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;repair()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang dapat menerima banyak kendaraan sebagai parameternya.&amp;nbsp;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Vehicle&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;engineActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/*&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;&amp;nbsp; kode lainnya&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;&amp;nbsp; */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* kode lainnya dalam pembuatan class Car,&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Motorcycle, dsb. */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;repair&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;vehicles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; vehicles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;vehicle &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${vehicle.licensePlate}&amp;nbsp;sedang melakukan perawatan`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk mengakses method dari class, sejauh ini kita perlu membuat instance dari classnya terlebih dahulu. Sehingga untuk memanggil&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;repair()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kita perlu membuat instance dari class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;H121S&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;tomMotor &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Motorcycle&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;GF121J&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Yamaha&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;dimasCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;TA1408K&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Tesla&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* Membuat instance untuk memanggil fungsi repair */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;vehicleFactory &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;vehicleFactory&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;repair&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; tomMotor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; dimasCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Kendaraan H121S sedang melakukan perawatan&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Kendaraan GF121J sedang melakukan perawatan&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Kendaraan TA1408K sedang melakukan perawatan&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kode tersebut berjalan sesuai harapan namun tidak efektif. Mengapa? Karena kita perlu membuat&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;instance&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;untuk sekedar memanggil satu fungsi dari class-nya tersebut. Membuat&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;instance&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;adalah membuat sebuah objek baru yang terbentuk melalui blueprint sehingga membutuhkan memori ekstra. Jika kita dapat mengakses method tersebut tanpa melalui instance mengapa tidak? Pada kasus inilah kita membutuhkan sebuah&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;static method&lt;/em&gt;. Static method merupakan method yang tidak dapat dipanggil oleh instance dari class, namun dapat dipanggil melalui class-nya sendiri.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada ES6 class kita dapat membuat static method dengan menambahkan keyword static sebelum deklarasi method-nya:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Vehicle&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;engineActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/*&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;&amp;nbsp; kode lainnya&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;&amp;nbsp; */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* kode lainnya dalam pembuatan class Car,&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Motorcycle, dsb. */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;VehicleFactory&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;repair&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;vehicles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; vehicles&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;vehicle &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${vehicle.licensePlate}&amp;nbsp;sedang melakukan perawatan`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;})&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian untuk memanggil methodnya kita bisa panggil melalui class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Vehicle&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;kemudian&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;repair()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/7074637508590433356'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/7074637508590433356'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/static-method-didalam-class-javascript.html' title='Static Method didalam Class Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-7034189726958651914</id><published>2020-04-27T23:43:00.000+07:00</published><updated>2020-11-27T21:02:35.229+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Inheritance Dalam OOP Javascript (Parent Class &amp;amp; Child Class)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dalam gambaran dunia nyata, banyak objek yang berbeda tetapi punya kesamaan atau kemiripan tertentu.&amp;nbsp;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Contohnya mobil dengan motor memiliki banyak kesamaan karena objek tersebut merupakan kendaraan. Mobil merupakan kendaraan darat begitu juga dengan motor. Mungkin yang membedakan objek tersebut adalah jumlah roda dan kapasitas penumpang yang dapat ditampung.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sama halnya pada OOP, beberapa objek yang berbeda bisa saja memiliki kesamaan dalam hal tertentu. Di situlah konsep inheritance atau pewarisan harus diterapkan. Pewarisan dapat mencegah kita melakukan perulangan kode. Untuk lebih memahaminya lihatlah contoh bagan pada sebuah kelas berikut:&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031216412445298e8b960399d06bf16eab880badd8.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031216412445298e8b960399d06bf16eab880badd8.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada bagan di atas kita dapat lihat class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Motorcycle&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Plane&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Helicopter&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;memiliki banyak properti yang sama seperti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;lisencePlate&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;manufacture&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;engineActive&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Kemudian memiliki beberapa method yang sama seperti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;startEngines()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;info()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;parking()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika kita ubah diagram class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;di atas menjadi sebuah kode maka kode tampak seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; wheels&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;wheels &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; wheels&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;engineActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; startEngines&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Mesin kendaraan&amp;nbsp;${this.licensePlate}&amp;nbsp;dinyalakan!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Nomor Kendaraan:&amp;nbsp;${this.licensePlate}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Manufacture:&amp;nbsp;${this.manufacture}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Mesin:&amp;nbsp;${this.engineActive ?&amp;nbsp;&quot;Active&quot;:&amp;nbsp;&quot;Inactive&quot;}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; droveOff&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${this.licensePlate}&amp;nbsp;melaju!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; openDoor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Membuka pintu!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; parking&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${this.licensePlate}&amp;nbsp;parkir!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Tidak ada masalah dengan kode tersebut, tetapi jika kita akan membuat kelas lainnya seperti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Motorcycle&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Plane&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Helicopter&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;maka kita harus menuliskan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;properti&lt;/em&gt;&amp;nbsp;dan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;method&lt;/em&gt;&amp;nbsp;yang sama secara berulang.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan teknik&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;inheritance&lt;/em&gt;, kita bisa mengelompokkan properti dan method yang sama. Caranya dengan membuat sebuah kelas baru yang nantinya akan diturunkan sifatnya pada class lain:&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031216453692b650a5c0e0b6c77a74227d408e5757.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031216453692b650a5c0e0b6c77a74227d408e5757.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Ketika class Vehicle telah dibuat, kelas lainnya dapat melakukan extends pada kelas tersebut untuk mewarisi sifatnya. Dalam pewarisan, class Vehicle dapat disebut sebagai super atau parent class. Kelas yang mewarisi sifat dari parent class disebut dengan child class.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada JavaScript jika kita ingin mewariskan sifat class, lakukan dengan keyword extends seperti berikut:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ChildClass&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;ParentClass&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sebagai contoh mari kita buat class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Vehicle&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;yang nantinya akan kita gunakan sebagai parent class.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Vehicle&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;engineActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; startEngines&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Mesin kendaraan&amp;nbsp;${this.licensePlate}&amp;nbsp;dinyalakan!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Nomor Kendaraan:&amp;nbsp;${this.licensePlate}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Manufacture:&amp;nbsp;${this.manufacture}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Mesin:&amp;nbsp;${this.engineActive ?&amp;nbsp;&quot;Active&quot;:&amp;nbsp;&quot;Inactive&quot;}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; parking&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${this.licensePlate}&amp;nbsp;parkir!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kemudian kita bisa membuat class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sebagai child class dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Vehicle&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Vehicle&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; wheels&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;wheels &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; wheels&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;droveOff&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${this.licensePlate}&amp;nbsp;melaju!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;openDoor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Membuka pintu!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan begitu selain properti dan method yang terdapat di dalamnya, class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;juga dapat mengakses seluruh properti dan method yang terdapat pada class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Vehicle&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Vehicle&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;engineActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;startEngines&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Mesin kendaraan&amp;nbsp;${this.licensePlate}&amp;nbsp;dinyalakan!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Nomor Kendaraan:&amp;nbsp;${this.licensePlate}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Manufacture:&amp;nbsp;${this.manufacture}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Mesin:&amp;nbsp;${this.engineActive ?&amp;nbsp;&quot;Active&quot;:&amp;nbsp;&quot;Inactive&quot;}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;parking&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${this.licensePlate}&amp;nbsp;parkir!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Vehicle&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; wheels&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;wheels &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; wheels&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;droveOff&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${this.licensePlate}&amp;nbsp;melaju!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;openDoor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Membuka pintu!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;car &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;H121S&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;startEngines&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Mesin kendaraan H121S dinyalakan!&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Oiya pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;constructor&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;class&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, kita melihat penggunaan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;super()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, apa itu maksudnya? Keyword&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;super&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;digunakan untuk mengakses properti dan method yang ada pada induk class ketika berada pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;child class&lt;/em&gt;. Jadi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;super(lisencePlate, manufacture)&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;di atas berarti kita mengakses&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;constructor&lt;/em&gt;&amp;nbsp;dari&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;parent class&lt;/em&gt;&amp;nbsp;dan mengirimkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;lisencePlate&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;manufacture&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sebagai data yang dibutuhkan olehnya agar objek (&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;)&amp;nbsp;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Car&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;berhasil dibuat.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Penggunaan super sangat berguna ketika kita hendak menjalankan&amp;nbsp;&lt;a href=&quot;https://en.wikipedia.org/wiki/Method_overriding&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;method overriding&lt;/em&gt;&lt;/a&gt;&amp;nbsp;pada method parent. Contohnya kita akan melakukan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;method overriding&lt;/em&gt;&amp;nbsp;pada method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;info()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan menambahkan informasi jumlah roda pada mobil, maka kita dapat melakukannya dengan seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;extends&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Vehicle&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; wheels&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;licensePlate&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;wheels &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; wheels&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;droveOff&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Kendaraan&amp;nbsp;${this.licensePlate}&amp;nbsp;melaju!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;openDoor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Membuka pintu!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* overriding method info dari parent class */&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Jumlah roda:&amp;nbsp;${this.wheels}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;H121S&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Nomor Kendaraan: H121S&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Manufacture: Honda&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Mesin: Inactive&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Jumlah roda: 4&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dalam melakukan pewarisan kelas, tidak ada tingkatan yang membatasinya. Maksudnya, kita dapat mewariskan sifat kelas A pada kelas B, lalu kelas B mewarisi sifatnya kembali pada kelas C dan selanjutnya. Sama halnya dengan Nenek kita mewarisi sifatnya kepada orang tua kita kemudian orang tua kita mewarisi sifatnya kepada kita.&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sehingga jika dilihat dari bagan sebelumnya, class tersebut masih bisa dikelompokkan kembali menjadi seperti ini:&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200312165044bad7c7034d9d728224594a2fde9a7693.png&quot; height=&quot;448&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200312165044bad7c7034d9d728224594a2fde9a7693.png&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/7034189726958651914'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/7034189726958651914'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/inheritance-dalam-oop-javascript-parent.html' title='Inheritance Dalam OOP Javascript (Parent Class &amp;amp; Child Class)'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-5426001098743584806</id><published>2020-04-27T23:21:00.000+07:00</published><updated>2020-11-27T21:02:35.294+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Cara Menambahkan Method didalam Class Javascript</title><content type='html'>&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Untuk menambahkan method pada class, kita juga cukup menuliskannya pada body class, tidak perlu melalui prototype seperti menggunakan constructor function.&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; startEngines&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Mesin dinyalakan&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Manufacture:&amp;nbsp;${this.manufacture}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Color:&amp;nbsp;${this.color}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Engines:&amp;nbsp;${this.manufacture ?&amp;nbsp;&quot;Active&quot;&amp;nbsp;:&amp;nbsp;&quot;Inactive&quot;}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Red&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;startEngines&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Mesin dinyalakan&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Manufacture: Honda&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Color: Red&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Engines: Active&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;class&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, walaupun kita menuliskan method pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;body class&lt;/em&gt;, namun method tersebut tetap berada pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;prototype&lt;/em&gt;&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;chain&lt;/em&gt;&amp;nbsp;miliki&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;&amp;nbsp;yang terbuat. Kita bisa melihat bagaimana objek yang dibuat menggunakan class pada console browser&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;20200312163128914b6b721efd67a21c9e124a0111699e.gif&quot; height=&quot;640&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/20200312163128914b6b721efd67a21c9e124a0111699e.gif&quot; width=&quot;621&quot; /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/5426001098743584806'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/5426001098743584806'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/cara-menambahkan-method-didalam-class.html' title='Cara Menambahkan Method didalam Class Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-3272875657323418048</id><published>2020-04-27T23:17:00.000+07:00</published><updated>2020-11-27T21:02:35.356+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Property Accessor didalam Object Class Javascript</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Melalui objek class kita juga dapat mengubah nilai properti seperti ini:&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Red&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Warna mobil:&amp;nbsp;${johnCar.color}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// output -&amp;gt; Warna Mobil: Red&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;White&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Mengubah nilai properti color menjadi white&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Warna mobil: ${johnCar.color}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// output -&amp;gt; Warna Mobil: White&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan class kita juga dapat mengimplementasi getter/setter sebuah properti menjadi sebuah method seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Warna mobile&amp;nbsp;${this._color}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Warna mobil diubah dari&amp;nbsp;${this._color}&amp;nbsp;menjadi&amp;nbsp;${value}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;_color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Red&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// output -&amp;gt; Warna Mobil: Red&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;White&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Mengubah nilai properti color menjadi white&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// output -&amp;gt; Warna Mobil: White&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Perhatikan juga ketika kita menerapkan getter/setter pada properti class. Kita perlu mengubah atau membedakan penamaan properti aslinya dengan property accessor yang kita buat. Berdasarkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;code convention&lt;/em&gt;&amp;nbsp;yang ada kita perlu mengubah properti asli class-nya dengan menambahkan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;underscore&lt;/em&gt;&amp;nbsp;di depan nama propertinya (&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;_color&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;). Tanda&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;underscore&lt;/em&gt;&amp;nbsp;berfungsi sebagai tanda bahwa properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;_color&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tidak sebaiknya diakses langsung, namun harus melalui&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;property accessor&lt;/em&gt;&amp;nbsp;(getter/setter)&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/3272875657323418048'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/3272875657323418048'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/property-accessor-didalam-object-class.html' title='Property Accessor didalam Object Class Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-126474670732026932</id><published>2020-04-27T23:04:00.000+07:00</published><updated>2020-11-27T21:02:35.419+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Cara Membuat Instance di Dalam Class Javascript</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Setelah kita membuat class pada JavaScript, lantas bagaimana cara membuat instance dari class tersebut?&amp;nbsp;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Tapi sebelumnya, apa itu&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;? Instance merupakan objek yang memiliki properti dan method yang telah ditentukan oleh&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;blueprint&lt;/em&gt;-nya (class), atau singkatnya adalah objek yang merupakan hasil realisasi dari sebuah&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;blueprint&lt;/em&gt;.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sama seperti&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;constructor function&lt;/em&gt;, untuk membuat&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;&amp;nbsp;dari class pada ES6 kita gunakan keyword&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;new&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Red&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pembuatan class menggunakan ES6 lebih ketat dibandingkan dengan constructor function, di mana dalam pembuatan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;&amp;nbsp;wajib menggunakan keyword&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;new&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Jika kita tidak menuliskannya, maka akan terjadi error seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Red&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* error:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;TypeError: Class constructor Car cannot be invoked without &#39;new&#39;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita juga dapat membuat banyak instance dari class yang sama, dan tentunya objek yang kita buat memiliki karakteristik (properti dan method) yang sama. Walaupun sama, namun nilai dari propertinya bersifat unik atau bisa saja berbeda. Contohnya seperti ini:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Red&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;adamCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Tesla&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Black&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;adamCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Honda&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Tesla&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Variabel&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;johnCar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;adamCar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan sebuah objek dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Tentu keduanya akan memiliki properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;manufacture&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;color&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;enginesActive&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Namun pada output kita melihat bahwa nilai dari properti kedua objek tersebut berbeda, karena kita dapat memberikan nilai yang berbeda pada saat objeknya dibuat.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/126474670732026932'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/126474670732026932'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/cara-membuat-instance-di-dalam-class.html' title='Cara Membuat Instance di Dalam Class Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-199719167291005527</id><published>2020-04-27T23:03:00.000+07:00</published><updated>2020-11-27T21:02:35.482+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Constructor didalam Javascript</title><content type='html'>&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Deklarasi class menggunakan ES6 memiliki sifat yang sama seperti pembuatan class menggunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;function constructor&lt;/em&gt;&amp;nbsp;(seperti contoh sebelumnya).&amp;nbsp;&lt;/div&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Namun alih-alih menggunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;function constructor&lt;/em&gt;&amp;nbsp;dalam menginisialisasi propertinya, class ini memisahkan constructornya dan ditempatkan pada body class menggunakan method spesial yang dinamakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;constructor&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;constructor&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;biasanya hanya digunakan untuk menetapkan nilai awal pada properti berdasarkan nilai yang dikirimkan pada constructor. Namun sebenarnya kita juga dapat menuliskan logika di dalam constructor jika memang kita memerlukan beberapa kondisi sebelum nilai properti diinisialisasi.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kita juga melihat penggunaan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada constructor. Konteks dalam class, keyword&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merujuk pada &amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;&amp;nbsp;dari class tersebut. Sehingga&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dapat digunakan untuk mengelola properti yang terdapat pada&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/199719167291005527'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/199719167291005527'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/constructor-didalam-javascript.html' title='Constructor didalam Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-8133651715661645596</id><published>2020-04-27T22:54:00.000+07:00</published><updated>2020-11-27T21:02:35.543+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Apa Itu Class di Javascript?</title><content type='html'>&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dalam paradigma&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Object-Oriented Programming&lt;/em&gt;&amp;nbsp;(OOP), class merupakan sebuah blueprint yang dapat dikembangkan untuk membuat sebuah objek.&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;Blueprint&lt;/em&gt;&amp;nbsp;ini merupakan sebuah template yang di dalamnya menjelaskan seperti apa perilaku dari objek itu (berupa properti ataupun method).&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;img alt=&quot;2020031400163071868d05b7fff5009d785e8cb61890d3.png&quot; class=&quot;fr-fic fr-dib&quot; src=&quot;https://dicodingacademy.blob.core.windows.net/academies/2020031400163071868d05b7fff5009d785e8cb61890d3.png&quot; style=&quot;border-style: none; box-sizing: border-box; display: block; float: none; margin: 5px auto; max-width: 100%; position: relative; vertical-align: top;&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Paradigma OOP selalu digambarkan dengan kehidupan nyata. Visualisasi di atas mencontohkan gambaran umum OOP di mana terdapat sebuah blueprint kucing, nilai yang dimiliki kucing, dan kemampuan yang dapat dilakukan olehnya.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dalam OOP blueprint tersebut dikenal dengan class (kelas), nilai yang dimiliki olehnya dikenal dengan properti, kemampuan yang dimilikinya dikenal sebagai&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;behaviour/method&lt;/em&gt;&amp;nbsp;dan realisasi dari sebuah blueprint tersebut disebut&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dalam dunia pemrograman khususnya dalam paradigma OOP, kita sering membuat banyak objek dengan jenis yang sama. Dengan membuat blueprint ini kita dapat mengurangi duplikasi kode dalam membuat objek yang serupa&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Kebanyakan bahasa pemrograman memanfaatkan class dalam penerapan paradigma OOP. Pada JavaScript tidak ada konsep class murni bahkan hingga saat ini. Namun bukan berarti kita tidak bisa menerapkan paradigma OOP sepenuhnya.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Seperti yang kita ketahui, class pada OOP merupakan sebuah blueprint. Jika berbicara mengenai blueprint, JavaScript memiliki konsep untuk membuatnya tanpa melalui class. Konsep tersebut adalah&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;prototype&lt;/em&gt;&lt;/span&gt;. Sejak awal developer menggunakan konsep ini dalam menerapkan paradigma OOP di JavaScript.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Walaupun dapat menggantikan class, konsep prototype tidak serupa dengan class pada bahasa lain. Terlebih pada penulisan sintaknya. Hal ini menjadikan banyak developer kebingungan khususnya developer yang dasarnya dari bahasa&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;class basis&lt;/em&gt;&amp;nbsp;(seperti Java, C++, C#, Swift, etc.). Meskipun banyak juga developer yang merasa bahwa class tidak diperlukan pada JavaScript, namun fitur class ini tetap menjadi salah satu yang dikembangkan pada ECMAScript 6.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;A Class Before ES6&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sebelum ES6, Hal yang paling mendekati dengan class yaitu membuat sebuah objek menggunakan constructor function dan keyword&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;new&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, lalu untuk menambahkan method kita gunakan konsep&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;prototype&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;prototype&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;startEngines &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;Mobil dinyalakan...&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;};&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;prototype&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Manufacture: &quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Color: &quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Engines: &quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Active&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Inactive&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;));&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;var&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Red&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;startEngines&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Mobil dinyalakan...&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Manufacture: Honda&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Color: Red&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Engines: Active&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada kode di atas&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;merupakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;constructor function&lt;/em&gt;&amp;nbsp;yang akan membuat instance&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;baru setiapkan kode&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;new Car()&amp;nbsp;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;dieksekusi. Melalui&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car.prototype&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, method&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;startEngines()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;carInfo()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp; diwarisi pada setiap&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;&amp;nbsp;Car yang dibuat, sehingga&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;johnCar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;(sebagai instance&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;) dapat mengakses kedua method tersebut.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Teknik dasar ini yang digunakan dalam membuat class di JavaScript sebelum ES6.&lt;/div&gt;&lt;blockquote style=&quot;background-color: white; border-left: 2px solid rgb(94, 53, 177); box-sizing: border-box; color: #5e35b1; font-family: Quicksand, sans-serif; font-size: 16px; margin: 0px 0px 1rem; padding-left: 5px;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;“Mengapa method pada instance harus disimpan pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;prototype&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;atau&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;__proto__&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;? Mengapa tidak disimpan pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;constructor&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sama seperti properti?&amp;nbsp;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Alasannya adalah jika kita menyimpan method pada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;constructor&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;maka method tersebut akan selalu dibuat ketika&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;&amp;nbsp;dibuat. Ini bukan pendekatan yang baik karena jika method memiliki kode yang banyak, maka akan memakan memori yang banyak.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;Sedangkan jika menggunakan prototype, method hanya dibuat satu kali. Dan method tersebut diwarisi kepada setiap&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;instance&lt;/em&gt;&amp;nbsp;yang dibuat.”&lt;/div&gt;&lt;/blockquote&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br style=&quot;box-sizing: border-box;&quot; /&gt;&lt;/div&gt;&lt;h3 dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 1.75rem; font-weight: 300 !important; line-height: 1.2; margin-bottom: 0.5rem; margin-top: 0px;&quot;&gt;ES6 Classes&lt;/h3&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan hadirnya class pada ES6, pembuatan class di JavaScript menjadi lebih mudah dan juga penulisannya mirip seperti bahasa pemrograman lain berbasis class. Pembuatan class pada ES6 menggunakan keyword&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;class&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;itu sendiri kemudian diikuti dengan nama class-nya.&amp;nbsp;&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Sama seperti function constructor&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;constructor&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;manufacture &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; manufacture&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;color &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; color&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Sama seperti Car.prototype.startEngine&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; startEngines&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&#39;Mobil dinyalakan...&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;enginesActive &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// Sama seperti car.prototype.info&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Manufacture: ${this.manufacture}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Color: &amp;nbsp;${this.color}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Engines: ${this.enginesActive ? &quot;Active&quot; : &quot;Inactive&quot;}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; johnCar &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;Car&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Honda&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Red&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;startEngines&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;johnCar&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Mobil dinyalakan...&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Manufacture: Honda&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Color: Red&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Engines: Active&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika Anda terbiasa dengan bahasa pemrograman berbasis class, pasti penulisannya sangat serupa bukan?&lt;br /&gt;&lt;br /&gt;Walaupun dari segi sintaksis pembuatan class antara keduanya cukup berbeda, namun perilaku dari objek yang dibuat dengan keduanya sama.&lt;br /&gt;&lt;br /&gt;Inilah mengapa class pada ES6 hanya sebuah&amp;nbsp;&lt;a href=&quot;https://en.wikipedia.org/wiki/Syntactic_sugar&quot; rel=&quot;noreferrer noopener&quot; style=&quot;background-color: transparent; box-sizing: border-box; color: rgb(255, 84, 131) !important; text-decoration-line: none;&quot; target=&quot;_blank&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;syntactic sugar&lt;/em&gt;&lt;/a&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;&lt;/em&gt;dari konsep&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;prototype&lt;/em&gt;&amp;nbsp;yang sudah ada.&lt;/div&gt;&lt;blockquote style=&quot;background-color: white; border-left: 2px solid rgb(94, 53, 177); box-sizing: border-box; color: #5e35b1; font-family: Quicksand, sans-serif; font-size: 16px; margin: 0px 0px 1rem; padding-left: 5px;&quot;&gt;&lt;div style=&quot;box-sizing: border-box; margin-bottom: 1rem;&quot;&gt;“Ketika kita hendak membuat sebuah&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;constructor function&lt;/em&gt;&amp;nbsp;ataupun&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;class&lt;/em&gt;. Secara&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;code convention&lt;/em&gt;&amp;nbsp;(aturan penulisan), gunakan CamelCase dalam penamaannya. Contohnya&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;daripada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;car&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;SportCar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;daripada&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;sportCar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;atau&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;Sportcar&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/8133651715661645596'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/8133651715661645596'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/apa-itu-class-di-javascript.html' title='Apa Itu Class di Javascript?'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-8987763343952102402</id><published>2020-04-27T22:41:00.000+07:00</published><updated>2020-11-27T21:02:35.605+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><title type='text'>Contoh Penggunaan Default Parameters Di Javascript</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Dengan menggunakan default parameters, nilai pada parameter tidak akan menghasilkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;undefined&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;walaupun kita tidak memberikan nilai ketika fungsi tersebut dipanggil. Default parameter dapat digunakan pada regular function ataupun arrow function.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Berikut contoh dari penggunaan default parameter:&lt;/div&gt;&lt;div class=&quot;panel panel-default panel-code&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/6707?from=6700#tab1-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;Regular Function&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; sayHello&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Stranger&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; greet &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Hello&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`${greet}&amp;nbsp;${name}!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;sayHello&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Dimas&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Hai&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;sayHello&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Hai Dimas!&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Hello Stranger!&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/6707?from=6700#tab1-code2&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;Arrow Function&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code2&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; sayHello &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Stranger&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; greet &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Hello&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`${greet} ${name}!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;sayHello&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Dimas&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Hai&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;sayHello&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Hai Dimas!&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Hello Stranger!&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada contoh di atas, kita menggunakan tanda assignment (=) untuk menetapkan parameter&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;name&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dengan nilai default&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;“Stranger”&lt;/em&gt;, dan parameter greet dengan nilai default&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;“Hello”&lt;/em&gt;. Hal ini sangat berguna ketika kita memanggil fungsi&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;sayHello()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tanpa menetapkan nilai parameter di dalamnya, karena walaupun kita tidak menetapkan nilainya, kedua parameter tersebut tidak akan menghasilkan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;undefined&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/8987763343952102402'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/8987763343952102402'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/contoh-penggunaan-default-parameters-di.html' title='Contoh Penggunaan Default Parameters Di Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-6611963609573504821</id><published>2020-04-27T22:37:00.000+07:00</published><updated>2020-11-27T21:02:35.667+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Penggunaan This dalam Arrow Function di Javascript</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Perbedaan karakteristik dari arrow function dan regular function selanjutnya ada pada penggunaan keyword&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Penjelasan dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;sendiri menyusul di materi class. Namun kita akan bahas sedikit mengenai ini untuk menggambarkan perbedaan ketika&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;digunakan oleh arrow function dan regular function.&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Jika sebuah regular function dipanggil dengan menggunakan&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;keyword&lt;/em&gt;&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;new&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Maka nilainya akan menjadi objek, contohnya:&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;People&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; age&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hobby&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;age &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; age&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;hobby &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hobby&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;programmer &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;People&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;John&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Coding&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Read book&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ping-pong&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;hobby&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;John&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;18&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;[ &#39;Coding&#39;, &#39;Read book&#39;, &#39;Ping-pong&#39; ]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Objek yang dibuat menggunakan function dengan keyword&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;new&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, sama halnya seperti kita membuat objek seperti menggunakan objek literals { }.&lt;/div&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; dir=&quot;ltr&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; margin-bottom: 10px; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; programmer &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;John&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; age&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; hobby&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Coding&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Read book&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ping-Pong&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;hobby&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;John&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;18&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;[ &#39;Coding&#39;, &#39;Read book&#39;, &#39;Ping-pong&#39; ]&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Pada objek,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;keyword mengembalikan nilai objeknya sendiri.&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dapat digunakan untuk mengelola properti pada objeknya. Namun jika fungsi dipanggil tanpa menggunakan keyword new,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;akan memiliki nilai global object (Window jika di browser).&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Sedangkan fungsi yang dibuat dengan menggunakan gaya arrow tidak akan pernah memiliki nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, yang artinya kita tidak pernah bisa membuat objek menggunakan arrow function. Jika kita menggunakan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;pada arrow function maka nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;tersebut merupakan nilai objek di mana arrow function itu berada.&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Perhatikan kedua contoh kode berikut:&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a class=&quot;nav-link active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/6700?from=6693#tab1-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;Regular Function&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a class=&quot;nav-link&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/6700?from=6693#tab1-code2&quot; role=&quot;tab&quot; style=&quot;background-color: transparent; border-radius: 0.25rem; box-sizing: border-box; color: rgb(48, 48, 48) !important; display: block; padding: 0.5rem; text-decoration-line: none;&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;People&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; age&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hobby&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;age &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; age&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;hobby &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hobby&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// menambahkan introMyself ke People&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;People&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;prototype&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;introMyself &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// this -&amp;gt; People&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; setTimeout&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// this -&amp;gt; ??&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Hello! Nama saya&amp;nbsp;${this.name}, umur saya&amp;nbsp;${this.age}.`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Hobby saya adalah&amp;nbsp;${this.hobby}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;programmer &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;People&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;John&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Coding&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Read book&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ping-pong&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;introMyself&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Hello! Nama saya undefined, umur saya undefined.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Hobby saya adalah undefined&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link active show&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/6700?from=6693#tab1-code2&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;Arrow Function&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane active show&quot; id=&quot;tab1-code2&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;People&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; age&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hobby&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;age &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; age&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;hobby &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; hobby&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// menambahkan introMyself ke People&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;People&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;prototype&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;introMyself &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// this -&amp;gt; People&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; setTimeout&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// this -&amp;gt; People&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Hello! Nama saya&amp;nbsp;${this.name}, umur saya&amp;nbsp;${this.age}.`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Hobby saya adalah&amp;nbsp;${this.hobby}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;300&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; programmer &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;box-sizing: border-box; color: #660066;&quot;&gt;People&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;John&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;lit&quot; style=&quot;box-sizing: border-box; color: #006666;&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Coding&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Read book&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Ping-pong&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;]);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;programmer&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;introMyself&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;();&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;/* output:&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Hello! Nama saya John, umur saya 18.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;Hobby saya adalah Coding,Read book,Ping-pong&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;*/&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Fungsi yang dituliskan di dalam&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;setTimeout()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dipanggil tanpa&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;new&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;. Itu berarti nilai dari&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;jika digunakan di dalam fungsi tersebut adalah&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;global object&lt;/em&gt;. Itulah mengapa output akan menghasilkan nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;undefined&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;ketika properti&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;name&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;age&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, dan&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;hobby&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;dipanggil.&lt;/div&gt;&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Berbeda ketika kita menuliskan arrow function di dalam&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;setTimeout()&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;, nilai&amp;nbsp;&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;this&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&amp;nbsp;memiliki nilai objek sesuai dengan konteksnya (&lt;span style=&quot;box-sizing: border-box; font-weight: 700;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&lt;span style=&quot;background-color: #f9f2f4; box-sizing: border-box; color: #c7254e; padding: 2px 4px;&quot;&gt;People&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;). Arrow function akan sangat berguna untuk kasus seperti ini&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/6611963609573504821'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/6611963609573504821'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/penggunaan-this-dalam-arrow-function-di.html' title='Penggunaan This dalam Arrow Function di Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry><entry><id>tag:blogger.com,1999:blog-3950729017636573179.post-9116876108544519765</id><published>2020-04-27T22:32:00.000+07:00</published><updated>2020-11-27T21:02:35.731+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Regular function vs Arrow Function Javascript</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;Regular function dapat berupa function declaration atau function expression, namun arrow function hanya berupa function expression saja. Itu sebabnya arrow function memiliki nama lengkap&lt;em style=&quot;box-sizing: border-box;&quot;&gt;&amp;nbsp;“arrow function expressions”&lt;/em&gt;.&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;panel panel-default panel-code&quot; style=&quot;background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; margin-bottom: 1rem;&quot;&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/6686?from=6679#tab1-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;Regular function&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// function declaration&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;sayHello&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;greet&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`${greet}!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L3&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L4&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L5&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L6&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// function expression&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L7&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;sayName &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L8&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Nama saya&amp;nbsp;${name}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L9&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link show active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/6686?from=6679#tab1-code2&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;Arrow function&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab1-code2&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;box-sizing: border-box; color: #880000;&quot;&gt;// function expression&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;sayHello &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; greet &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`${greet}!`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; sayName &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; name &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Nama saya ${name}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #3d3d3d; font-family: &amp;quot;quicksand&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;Karena arrow function merupakan sebuah expression, maka ia hanya dapat digunakan untuk disimpan pada variabel (seperti contoh kode di atas), sebagai argumen pada sebuah fungsi, dan sebagai nilai dari properti objek.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #3d3d3d; font-family: &amp;quot;quicksand&amp;quot; , sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a class=&quot;nav-link active&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/6686?from=6679#tab2-code1&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;Stored in Variable&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane show active&quot; id=&quot;tab2-code1&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; sayName &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; name &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Nama saya ${name}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;);&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link active show&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/6686?from=6679#tab2-code2&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;Passed as An Argument&lt;/a&gt;&lt;/li&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane active show&quot; id=&quot;tab2-code2&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Dimas&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Widdy&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;&quot;Buchori&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;forEach&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;name &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Nama saya ${name}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;));&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;panel-heading bg-light&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px;&quot;&gt;&lt;ul class=&quot;nav nav-pills pl-2 pr-2&quot; role=&quot;tablist&quot; style=&quot;box-sizing: border-box; display: flex; flex-wrap: wrap; list-style: none; margin-bottom: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0.5rem !important;&quot;&gt;&lt;li class=&quot;nav-item&quot; style=&quot;box-sizing: border-box; cursor: pointer;&quot;&gt;&lt;a aria-selected=&quot;true&quot; class=&quot;nav-link active show&quot; data-toggle=&quot;pill&quot; href=&quot;https://www.dicoding.com/academies/163/tutorials/6686?from=6679#tab2-code3&quot; role=&quot;tab&quot; style=&quot;background: 0px 0px; border-bottom: 4px solid rgb(44, 62, 80); border-radius: 0px; box-sizing: border-box; color: rgb(44, 62, 80) !important; display: block; font-weight: 700; padding: 0.5rem; text-decoration-line: none;&quot;&gt;Stored in Object Property&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;panel-body bg-light p-2&quot; style=&quot;background-color: rgb(248, 249, 250) !important; box-sizing: border-box; color: #3d3d3d; font-family: Quicksand, sans-serif; font-size: 16px; padding: 0.5rem !important;&quot;&gt;&lt;div class=&quot;tab-content&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;div class=&quot;tab-pane active show&quot; id=&quot;tab2-code3&quot; role=&quot;tabpanel&quot; style=&quot;box-sizing: border-box;&quot;&gt;&lt;pre class=&quot;prettyprint linenums prettyprinted&quot; style=&quot;background-color: whitesmoke; border-radius: 4px; border: 1px solid rgb(136, 136, 136); box-sizing: border-box; color: #333333; font-family: Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace; font-size: 12.8px; line-height: unset; max-height: 500px; overflow-wrap: break-word; overflow: visible auto; padding: 2px; white-space: pre-wrap; word-break: break-all;&quot;&gt;&lt;ol class=&quot;linenums&quot; style=&quot;box-sizing: border-box; margin-bottom: 0px; margin-top: 0px; min-width: max-content;&quot;&gt;&lt;br /&gt;&lt;li class=&quot;L0&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;box-sizing: border-box; color: #000088;&quot;&gt;const&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; user &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L1&quot; style=&quot;background: rgb(238, 238, 238); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp; &amp;nbsp; introduce&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt; name &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;&amp;nbsp;console&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;box-sizing: border-box; color: black;&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;box-sizing: border-box; color: #008800;&quot;&gt;`Nama saya&amp;nbsp;${name}`&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li class=&quot;L2&quot; style=&quot;background: rgb(255, 255, 255); box-sizing: border-box; list-style-type: none;&quot;&gt;&lt;span class=&quot;pun&quot; style=&quot;box-sizing: border-box; color: #666600;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/9116876108544519765'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/3950729017636573179/posts/default/9116876108544519765'/><link rel='alternate' type='text/html' href='https://enunsolutions.blogspot.com/2020/04/regular-function-vs-arrow-function.html' title='Regular function vs Arrow Function Javascript'/><author><name>Sahrul Id</name><uri>http://www.blogger.com/profile/16029877781831839996</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='31' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixLsOqF7vevMpGs_v3p8E2q3k0XbGEBEYdURv5aDjEgN_IT4_mm9oLLRPSIWXbDqKcOlOeL39dYKkwvzW-GkKpHKOrrFMFwy5LQhwFDkDc--kpMnXMvRl4vrWRBLk4s0U/s220/Honeyview_sahrul+edit.png'/></author></entry></feed>