Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Objek menggunakan literal
- let mahasiswa = {
- nama: "Syarif",
- nim: "12345",
- jurusan: "Informatika",
- getInfo: function() {
- return this.nama + " (" + this.nim + ") - " + this.jurusan;
- }
- };
- console.log(mahasiswa.getInfo());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement