This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Nilai Primitive | |
| umurDimas = 40 | |
| // Nilai Reference | |
| kucing.push('darkness') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Kloning array | |
| let kucing = ['leo', 'lui'] | |
| let klonKucing = [...kucing] | |
| console.log(kucing) | |
| // ["leo", "lui"] | |
| // kita ubah nilai kucing | |
| kucing.push('darkness') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let manusia = { | |
| nama: 'Dimas', | |
| umur: 20, | |
| peliharaan: { | |
| ikan: 'Lemon', | |
| } | |
| } | |
| let klonManusia = {...manusia} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let nomor = [1, 2, 3] | |
| let klonNomor = Array.from(nomor) | |
| console.log(klonNomor) | |
| // [1, 2, 3] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let binatang = {kucing: '🐱', tikus: '🐭'} | |
| let klonBinatang = Object.assign({}, binatang) | |
| console.log(klonBinatang) | |
| // {kucing: '🐱', tikus: '🐭'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Kloning array | |
| let nomor = [1, 2, 3] | |
| let klonNomor = JSON.parse(JSON.stringify(nomor)) | |
| console.log(klonNomor) | |
| // [1, 2, 3] | |
| // Kloning object | |
| let binatang = {kucing: '🐱', tikus: '🐭'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://aka.ms/terminal-profiles-schema", | |
| "copyFormatting": "none", | |
| "copyOnSelect": true, | |
| "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", | |
| "experimental.rendering.forceFullRepaint": true, | |
| "experimental.rendering.software": true, | |
| "initialCols": 110, | |
| "initialPosition": "230,140", | |
| "initialRows": 20, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Complete the sortRoman function below. | |
| function sortRoman(names) { | |
| const namesObj = names.reduce((sum, curr) => { | |
| const currentSum = sum; | |
| const [name, order] = curr.split(' '); | |
| if (!currentSum[name]) { | |
| currentSum[name] = []; | |
| } | |
| currentSum[name].push(curr); | |
| currentSum[name] = sortByRomanNumerals(currentSum[name]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class App { | |
| public static void main(String[] args) { | |
| List<Mahasiswa> mahasiswas = new ArrayList<>(); | |
| List<Mahasiswa> mahasiswasCopy = new ArrayList<>(); | |
| Karyawan karyawan = new Karyawan(); | |
| karyawan.NIM = "10118080"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fakultas.Pascasarjana; | |
| import fakultas.Sarjana; | |
| import prodi.Prodi; | |
| import prodi.TeknikInformatika; | |
| import prodi.IlmuKomunikasi; | |
| public class App { | |
| public static void main(String[] args) { | |
| testProdi(new IlmuKomunikasi()); | |
| testProdi(new TeknikInformatika()); |