Skip to content

8. What are Javascript Operators in Hindi?

    Javascript Operators in Hindi

    Inroduction of javascript operators in hindi

    इस लेख मे हम Operators के बारे मे detail मे जानेंगे। इस लेख मे हम जानेंगे की operators किसे कहते है? operand किसे कहते है? इसका कैसे इस्तेमाल करते है?


    Javascript Operators in Hindi

    आपने Variables के बारे मे तो जान लिया है। आपने variables को store करवा लिया तो उसे कुछ काम मे तो लेना होगा। तो वो काम आप operators के द्रारा कर सकते है।

    उदाहरण के लिए मान लीजिये की आपको two numbers को add करना है तो आप यहा + operator का इस्तेमाल करे। यहा + (addition) को operator कहते है।

    <!DOCTYPE html>
    <html>
    <body>
    <h3>Javascript Operators in Hindi</h3>
    <p id="one"></p>
    <script>
    var a = 5;
    var b = 2;
    var c = a + b;
    document.getElementById("one").innerHTML = c;
    </script>
    </body>
    </html>
    

    यहा a variable मे 5 को और b variable मे 2 को store किया गया है।

    यहा c variable मे a और b के sum को store किया गया है।

    यहा sum करने के लिए arithmetic add operator का इस्तेमाल किया है।

    यहा अलग अलग काम के लिए अलग अलग operators use किये जाते है।

    जैसे की

    • Arithmetic Operators
    • Comparison Operators
    • Assignment Operators
    • Type Operators
    • String Operators
    • Logical Operators
    • Bit-wise Operators

    What is Operand?

    operand को हम उदाहरण से समझते है।

    sum = a + b;

    यहा तीन variables sum, a, b को operand कहते है?

    और ‘+’ को operator कहते है।


    Javascript Arithmetic Operators

    OperatorsDescription
    +Addition ( add two or more operands)
    Subtraction (Subtract two or more operands)
    * Multiplication (multiply two or more operands)
    ** Exponentiation
    / Division (divide two or more operands)
    % Modulus (Remainder of Division)
    ++ Increment
    Decrement

    Javascript Comparison Operators

    OperatorउदाहरणDescription
    ==a == ba और b दोनों की value equal है।
    ===a === ba और b दोनों की value और data type equal है।
    !=a != ba और b दोनों की value equal नहीं है।
    !==a !== ba और b दोनों की value और data type equal नहीं है।
    >a > ba की value b से ज्यादा है।
    >=a >= ba की value b से ज्यादा और बराबर है।
    <a < ba की value b से कम है।
    <=a <= b a की value b से कम और बराबर है।
    ? ternary operator

    Javascript Assignment Operators

    Operator उदाहरण Same As
    =a = ba = b
    +=a += ba = a + b
    -=a -= ba = a – b
    *=a *= ba = a * b
    /=a /= ba = a / b
    %=a %= ba = a % b
    **=a **= ba = a ** b

    Javascript Type Operators

    Operator Description
    typeofयह Variable के type को return करता है।
    instanceof इसका इस्तेमाल Object का instance check करने के लिए किया जाता है |

    Javascript String Operators

    यहा Strings को जोड़ने (concatenate) के लिये + Operator का use होता है।

    उदाहरण

    <!DOCTYPE html>
    <html>
    <body>
    <h4>Javascript Operators in Hindi</h4>
    <p id="one"></p>
    <script>
    var fname = "rahul";
    var lname = "mehra";
    document.getElementById("one").innerHTML = fname + " " + lname;
    </script>
    </body>
    </html>
    

    आप += operator का use करके string को जोड़ सकते हो।

    उदाहरण

    <!DOCTYPE html>
    <html>
    <body>
    <h5>Javascript Operators in Hindi</h5>
    <p id="one"></p>
    <script>
    var fname = "rahul";
    fname += "mehra"
    document.getElementById("one").innerHTML = fname;
    </script>
    </body>
    </html>
    

    Javascript Logical Operators

    Operator उदाहरण Description
    And (&&)a && bदोनों की value true है तब यह true होता है।
    OR(॥)a ॥ b दोनों की value false है तब यह False होता है।
    NOT (!)! aयह Values को inverse कर देता है।

    Javascript Bit-wise Operators

    bit operators 32 bit पर काम करते है।

    कोई भी number को पहले 32 bit binary मे convert किया जाता है। और उसके result को Javascript binary से Number मे convert करता है।

    OperatorDescription
    &AND
    OR
    ~NOT
    ^XOR
    <<Zero fill left side
    >>Signed right shift
    >>>Zero fill right shift

    सभी Operators के बारे मे आगे हम detail मे जानेंगे।

    Next : Javascript arithmetic Operators in Hindi

    Leave a Reply

    Your email address will not be published. Required fields are marked *