Important Notice:

Conditional Statements in JavaScript

Conditional Statements in JavaScript

30 views 1 min read

Conditional Statements in JavaScript (जावास्क्रिप्ट में कंडीशनल स्टेटमेंट)

1. Introduction to Conditional Statements (कंडीशनल स्टेटमेंट का परिचय)

हिंदी व्याख्या: Conditional Statements JavaScript में इस्तेमाल किए जाते हैं ताकि प्रोग्राम अलग-अलग स्थितियों (conditions) के अनुसार अलग-अलग काम कर सके। मतलब अगर कोई शर्त (condition) सही है तो एक काम करो, गलत है तो दूसरा काम करो। यह प्रोग्राम को intelligent और decision-making बनाने में मदद करता है।

English Explanation: Conditional Statements are used in JavaScript so that the program can behave differently based on different conditions. It means if a condition is true, do one thing, if false, do another thing. This helps make the program intelligent and capable of making decisions.

2. Types of Conditional Statements (कंडीशनल स्टेटमेंट के प्रकार)

हिंदी व्याख्या: JavaScript में मुख्य रूप से 4 प्रकार के Conditional Statements हैं:

  1. if Statement
  2. if-else Statement
  3. if-else if-else (else-if ladder)
  4. switch Statement

English Explanation: There are mainly 4 types of Conditional Statements in JavaScript:

  1. if Statement
  2. if-else Statement
  3. if-else if-else (else-if ladder)
  4. switch Statement

Related Notes