code source JavaScript Operators
timestamps: Arithmetic operators 00.01 Assignment operators 06.02 string operators 12.01 Comparison operators 14.32 logical operators 21.08 JavaScript Operators JavaScript Arithmetic Operators :- It is used to perform arithmetic operation on numbers and variables. Addition arithmetic operators (+) : With this operator programmer can add two values ; var a = 4+5; console.log(a); //Output : 9 Subtraction arithmetic operators ( - ) : With this operator programmer can subtract two values. var a = 5-4; console.log(a) // Output : 1 Multiplication arithmetic operators (*): this help a programmer to multiply two values; var a = 4*5; console.log(a) // Output: 20 Exponentiation arithmetic operators (**):By using this programmer can get output in Exponentiation form (23 ). Modulus (Division Remainder) arithmetic operators (%) : with this programmer divide two values and get remainder in the result. Increment arithmetic operators (++): this operator increase value by adding value 1 in existing value. Decrement arithmetic operators(--) this operator decrease value by adding value 1 in existing value. JavaScript Assignment Operators It assign value to left side varible or number from the right side variable or number on given condition. = assign operator : this assign right value to left side values or variables. += this operator add right side value to left side value. -= this operator substract right side value from left side value. *= this operator multiply right side value to left side value. /= this operator divided left side value from right side value. %= this operator give remainder by divided left side value from right side value. **= this operator give exponentiation result in the form of 23 . JavaScript string operator this helps to cancatenate (add) strigns. Adding string to number return string Javascript comparison operators If programmer wants to compare two or more than two values than comparison operator is used. If check both values and datatype. Equal to (==) It will return true if condition equal in value. Not equal (!=) it will return true if condition is not equal in values. Equal values and Equal datatype (===) it will return true if conditionn is equal both in values and datatype. Not equal values or not equal datatype (!==) it will return true if condition is not equal in values or datatypes terms. Greater than It will return true if first first variable or values is greater than second variable or values. Less than It will return true if first values or variable is less than second variable or values. Greater than or Equal to this will return true if first variable or value is greater than or Equal to second variable or values. Less than or Equal to this will return true if first variable or values is less than or equal to second variable or values. JavaScript Logical Operators && Logical and : this operator return true if each and every given condition is true. || logical or : this operator return true if any one of given condition is true. ! logical not : this will return true on false condition and false on true condition. JavaScript Type operators We can also find the type of data we used in programming By using typeof( ) function.
No comments:
Post a Comment