JavaScript-New

Run Settings
LanguageJavaScript
Language Version
Run Command
/*var firstName = "Ichsan"; console.log(firstName); firstName = "Nur"; console.log(firstName); x = 100; var x; console.log(x); var x; x = 100; console.log(x); let y = 90; // let y; console.log(y); const a = 200; console.log(a); */ let a = 10; let b = "a"; let c = 12; console.log(typeof(a)); console.log(typeof(b)); // console untuk perhitungan operator console.log(a + c); console.log(a - c); console.log(a * c); console.log(a / c); console.log(a % c); let positif = 5; console.log(positif++); let prefix = 6; console.log(++prefix); // tipe data boolean let y = true; let x = false; console.log(typeof(y)); console.log(typeof(x)); // array let myArray = ["Coklat", 42.5, 22, true, "Programming"]; console.log(myArray); console.log(myArray[1]); // objek => properti disertai dengan nilai atau value let user = { namaDepan : "Muhammad", namaBelakang : "Nur Ichsan", umur : 19, pekerjaan : "Mahasiswa" }; console.log("Hallo perkenalkan saya " + user.namaDepan + " " + user.namaBelakang); console.log("Umur saya" + user.umur + " " + "tahun"); console.log("saya disini sebagai " + user.pekerjaan + " " + "Universitas Amikom Yogyakarta"); // Operator Penugasan let d = 10; let e = 5; d += e; // artinya -> d = d + e; d -= e; // artinya -> d = d - e; d *= e; // artinya -> d = d * e; d /= e; // artinya -> d = d + e; d %= e; // artinya -> d = d % e; console.log(d);
let a = 21; let b = 25; console.log(a > b); console.log(a < b);
Editor Settings
Theme
Key bindings
Full width
Lines