Skip to content
GitHub

Interactive Section - Fundamentals

အောက်ပါ Code များကို ခန့်မှန်းကြည့်ပါ။ ပြီးရင် Browser Console မှာ လက်တွေ့ ရိုက်ထည့်ပြီး အဖြေတိုက်ကြည့်ပါ။

let a = 10;
a = 20;
const b = 30;
// b = 40;
console.log(a + b);

👉 မေးခွန်း: Console မှာ ဘာပေါ်လာမလဲ? b = 40 ရှေ့က // (comment) ကို ဖြုတ်လိုက်ရင် ဘာဖြစ်မလဲ?

let x = "10";
let y = 20;
console.log(x + y);

👉 မေးခွန်း: အဖြေက 30 လား 1020 လား? ဘာလို့လဲ?

let score = 100;
console.log(score === "100");

👉 မေးခွန်း: true လား false လား? ဘာလို့လဲ?


Challenge: အသက် တွက်ကြည့်မယ် 🎂

Section titled “Challenge: အသက် တွက်ကြည့်မယ် 🎂”

သင့်ရဲ့ မွေးသက္ကရာဇ် (Year of birth) ကို Variable တစ်ခုထဲ ထည့်ပါ။ လက်ရှိ ခုနှစ် (Current Year) ကို Variable တစ်ခုထဲ ထည့်ပါ။ အဲဒီနှစ်ခုကို နှုတ်ပြီး သင့်အသက်ကို တွက်ထုတ်ပြပါ။

// Hint
const birthYear = 2000;
const currentYear = 2024;
// Your code here...