The if Statement (if स्टेटमेंट)
हिंदी व्याख्या: if स्टेटमेंट तब इस्तेमाल होता है जब हमें किसी शर्त को चेक करके काम करना हो। अगर शर्त सही (true) हुई तो कोड ब्लॉक अंदर चलेगा।
उदाहरण:
if (age >= 18) {
console.log("You are eligible to vote.");
}
English Explanation:
The if statement is used when we want to execute a block of code only if a condition is true.
Example:
if (age >= 18) {
console.log("You are eligible to vote.");
}