Operator perbandingan (Comparison Operators)

// let adalah variation let hungerLevel = 5; if (hungerLevel > 7) { console.log(" Time to eat! "); } else { console.log ( "We can eat later!" ); } //ceritanya:- // Den : den lapar, tahap lapar den 5. // Bini: Bi? (dio panggil den Bi) lapar dah ko? // Den : Dah // Bini : Tahap brapo dah lapa eh tu? // Den : tahap 7 dah sayang.. // Bini : uiih lapar dah tu! // Result : "Time to eat!"
Perbandingan melibatkan 2 kondisi respon jawapan kepada soalan iaitu
true or false (betul atau salah)

true = ada jawapannya ( Den lapar)
false = ada jawapannya ( bolum lapar )

if (lapar) { jawab.eh ( "Den Lapar") }
else { jawab.eh ("bolum lapar") }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.