Program JavaScript untuk Menulis ke Konsol

Contoh: Menggunakan console.log() // program to write to console // passing number console.log(8); // passing string console.log(‘hello’); // passing variable const x = ‘hello’; console.log(x); // passing function function sayName() { return ‘Hello John’; } console.log(sayName()); // passing string and a variable const name=”John”; console.log(‘Hello ‘ + name); // passing object let obj = { […]

Read more »