Created
March 7, 2021 23:51
-
-
Save krisnachy/96dcc98b801afccdd4f5aeaede819c22 to your computer and use it in GitHub Desktop.
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
//Multiline String | |
const string = ` | |
satu | |
dua | |
tiga` | |
console.log(string) | |
//Penyisipan | |
const myWork = 'ES6' | |
const work = `Sedang mengerjakan tugas ${myWork}` | |
//Let dan Const | |
let test = 'Latihan' | |
console.log(test) | |
test = 'Tugas' | |
console.log(test) //bisa diubah | |
const test = 'Latihan' | |
console.log(test) | |
test = 'Tugas' | |
console.log(test) //tidak bisa diubah | |
//Arrow Function | |
const lat === test => console.log(test) | |
//Destructuring | |
const latihan = { | |
nama: "Tugas", | |
materi: "ES6" | |
} | |
const { nama, materi } = latihan | |
console.log(nama) | |
//Ternary operation | |
const cek = (2 > 3) ? "Benar" : "salah" | |
console.log(cek) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment