Thuta Learning
ရှာဖွေရန်
BasicProgrammingbeginner

JS If...Else

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

if...else statements များကို သတ်မှတ်ထားသော condition တစ်ခုမှန်၊ မမှန် စစ်ဆေးပြီး မတူညီသော code block များကို run ရန် အသုံးပြုသည်။

javascript
const time = 14;

if (time < 12) {
  console.log("Good morning!");
} else if (time < 18) {
  console.log("Good afternoon!");
} else {
  console.log("Good evening!");
}
You should see
Good afternoon!
JS If...Else | Thuta Learning