Skip to content

Instantly share code, notes, and snippets.

View farridkun's full-sized avatar
💻
Learning & Evolved

Farrid Kuntoro farridkun

💻
Learning & Evolved
View GitHub Profile
### Keybase proof
I hereby claim:
* I am farridkun on github.
* I am farridkun (https://keybase.io/farridkun) on keybase.
* I have a public key ASAWcpjxaznyomR9w3t1uiACfVRv5WbCxlaf95p-ZfLIHwo
To claim this, I am signing this object:
@farridkun
farridkun / ganjil-genap.js
Created October 9, 2020 01:50
Ganjil Genap Decision with JS
// deklarasi variable & inputan
let input = prompt("Masukan angka");
// cek, jika bukan angka & angka >= 0 (tidak minus)
if (!isNaN(input) && input >= 0) {
// cek, jika angka di modulus2 == 0
if (input % 2 === 0) {
// Maka genap
alert("Ini adalah genap");
} else {
function warnTheSheep(queue) {
// your code here
}
// Test Function do not edit
function Test(fun, result) {
console.log(fun === result);
}
// Test assertions