=. x = x operator y.+=.-=.*=./= .%= .<<= .>>= .>>>= .&= .^= .|= .+. Addition.-. Subtraction.*. Multiplication./. Division.%. Modulus: return integer remainder. EG: 13 % 5 returns 3.++. Unary increment operator. Can be used before the operand to return the new result, or after the operand to return the old result.--. Unary decrement operator. Can be used before or after the operand.-. Unary operator. Changes sign of operand.&. Bitwise AND, returns 1s for bit positions where both operands are 1, eg 10 & 12 yields 8, since 1010 and 1100 yields 1000.|. Bitwise OR, returns 1s for bit positions where either operand is 1. EG: 10 | 12 yields 14, since 1010 and 1100 yields 1110.^. Bitwise XOR, returns 1s for bit positions where either operand is 1 but not both. EG: 10 ^ 12 yields 6, since 1010 and 1100 yields 0110.~. Bitwise NOT, inverts the operand, eg. ~10 yields 5, since 1010 yields 0101.<<. Shift binary a to the left b places and pad the right side with b 0s. EG: 9 << 2 yields 36 since 1001 becomes 100100.>>. Shift binary a to the right b places and discard the b rightmost digits. EG: 9 >> 2 yields 2 because 1001 becomes 10.>>>. Shift binary a to the right b places and discard the b rightmost digits then pad the left with 0s. EG: 9 >> 2 yields 2 because 1001 becomes 10. For non-negative numbers, >> and >>> yield the same results.&&. And, returns a if a is false, other wise returns b. EGs:true && false yields false .false && "dog" yields false ."dog" && false yields false ."cat" && "dog" yields "dog" !||. Or, returns a if a is true, other wise returns b. EGs:true || false yields true .false || "dog" yields dog ."dog" && false yields "dog" ."cat" || "dog" yields "cat" !!. Not, inverts the operand. EG: !true yields false.NaN is not equal to anything, including NaN. Null and Undefined are equal.==. Equal. True if operand values are equal. A data type conversion is performed if needed. EG: 5=="5" returns true. Objects must have same address space. EG: a1=new a; a2=new a; thus a1==a2 returns false.!=. Not equal.===. Strict equal. True if operand values and data types are equal. EG: 5==="5" returns false. Objects must have same address space. EG: a1=new a; a2=new a; thus a1===a2 returns false.!==. Strict not equal.
>.<.>=.<=.+. Note that the plus sign is used as both an arithmetic and a string operator. EGs:8 + 8 // 16 "8" + 8 // "88" 8 + "8" // "88" "8" + "8" // "88" 8 + 8 + "8" // "168" 8 + "8" + 8 // "888"
+=. EG: strResult += "is super".condition ? StatementIfTrue : StatementIfFalse. Same as if(condition) StatementIfTrue else StatementIfFalse.,. Evaluates both operands but returns the second. EG: If a is a 2-dimensional array with 10 elements on a side, the following code uses the comma operator to increment two variables at once. The code prints the values of the diagonal elements in the array:
for (var i=0, j=9; i <= 9; i++, j--)
document.writeln("a["+i+","+j+"]= " + a[i,j])
delete objectName
delete objectName.property
delete objectName['property']
delete objectName[index]
delete property //use only within a with statement.delete Foo.prototype.bar.propertyNameOrNumber in objectName. Returns true if the specified property is in the specified object.objectName instanceof objectType. Returns true if the specified object is of the specified object type.objectName = new objectType (param1 [,param2] ...[,paramN]). Creates an instance of a user-defined object type or of one of the built-in object types that has a constructor function.this. Refers to the current object, usually the calling object. EG: onChange="run(this, 12)".typeof expression
typeof (expression). Returns string indicating data type. The strings returned are: string, number, Boolean, object, function, undefined, or null.void (expression)
void expression. Evaluates expression but returns nothing, i.e. returns undefined. EG: <a href="void(document.form.submit())">Click here to submit</a>.From low to high:
2008-04-30 21:12:20Z