![]() (4) In a Word document you should be able to select the insert tab and then click the symbol tab. (3) Hold down the key and on the numeric keypad press the digits "7" "8" and "9" in that order, then release the key. (2) Hold down the key and on the numeric keypad press the digits "2" and "1" in that order, then release the key. (1) Hold down the key and on the numeric keypad press the digits "0", "1", "6" and "7" in that order, then release the key. NOTE: For the numbers use the numeric keypad, not the upper keyboard numbers. Each method appear to work in the systems we've tried, but if one set doesn't work, try the others. Try the following code to implement assignment operator in JavaScript.ĭocument.write("Value of a => (a = b) => ") ĭocument.write("Value of a => (a += b) => ") ĭocument.write("Value of a => (a -= b) => ") ĭocument.There are multiple sequences of keystrokes to try in web pages, HTML, and Microsoft Word. Note − Same logic applies to Bitwise operators so they will become like >=, >=, &=, |= and ^=. It takes modulus using two operands and assigns the result to the left operand. It divides the left operand with the right operand and assigns the result to the left operand. It multiplies the right operand with the left operand and assigns the result to the left operand. It subtracts the right operand from the left operand and assigns the result to the left operand. It adds the right operand to the left operand and assigns the result to the left operand. JavaScript supports the following assignment operators − Sr.No.Īssigns values from the right side operand to the left side operandĮx: C = A + B will assign the value of A + B into C Try the following code to implement Bitwise operator in JavaScript. This operator is just like the > operator, except that the bits shifted in on the left are always zero. The left operand’s value is moved right by the number of bits specified by the right operand. It is a unary operator and operates by reversing all the bits in the operand.īinary Right Shift Operator. Exclusive OR means that either operand one is true or operand two is true, but not both. It performs a Boolean exclusive OR operation on each bit of its integer arguments. It performs a Boolean OR operation on each bit of its integer arguments. It performs a Boolean AND operation on each bit of its integer arguments. JavaScript supports the following bitwise operators −Īssume variable A holds 2 and variable B holds 3, then − Sr.No. Try the following code to learn how to implement Logical Operators in JavaScript. If a condition is true, then the Logical NOT operator will make it false. Reverses the logical state of its operand. If any of the two operands are non-zero, then the condition becomes true. If both the operands are non-zero, then the condition becomes true. JavaScript supports the following logical operators − Set the variables to different values and different operators and then try. The following code shows how to use comparison operators in JavaScript. JavaScript supports the following comparison operators −Ĭhecks if the value of two operands are equal or not, if yes, then the condition becomes true.Ĭhecks if the value of two operands are equal or not, if the values are not equal, then the condition becomes true.Ĭhecks if the value of the left operand is greater than the value of the right operand, if yes, then the condition becomes true.Ĭhecks if the value of the left operand is greater than or equal to the value of the right operand, if yes, then the condition becomes true.Ĭhecks if the value of the left operand is less than or equal to the value of the right operand, if yes, then the condition becomes true. Set the variables to different values and then try. ![]() The following code shows how to use arithmetic operators in JavaScript. Note − Addition operator (+) works for Numeric as well as Strings. Outputs the remainder of an integer division Subtracts the second operand from the first JavaScript supports the following arithmetic operators −Īssume variable A holds 10 and variable B holds 20, then − Sr.No. Lets have a look on all operators one by one. JavaScript supports the following types of operators. Here 4 and 5 are called operands and ‘+’ is called the operator. Let us take a simple expression 4 + 5 is equal to 9.
0 Comments
Leave a Reply. |