Java: &, | also have the logical function. But it differents with &&, || which have short circuiting function.
javascript special operator
instanceof: Test object class
in: Test whether property exists, prop in objectName
in object: test property whether in object
** in array**: test index (not element) whether in array
1 2 3 4 5
var testInArray = [7, 8, 9]; "0" in testInArray; // true 1 in testInArray; // true "7" in testInArray; // false 8 in testInArray; // false
delete: Remove a property
typeof: Determine type of operand
void: return undefined value
>>>: Shift right with zero extension
===, !== : Test for strict equality/inequality, type and value should be tested.
!!x: get equality of boolean of x
go
++, –: only supports post increment/decrement
1 2 3 4 5
/*** java ***/ Int demoInt2 = demoInt1++ ++demoInt1 - x ==y, x != y // value equals or not - x.equals(y) // same object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
### python ### >>>a**b == pow(a, b) >>>(a//b, a%b) == (a//b, a%b) == divmod(a, b) >>> x == y, x !=y # value equals or not, check __eq__ >>> x is y, x isnot y # same object or not, check pointer x in y, x notin y >>> abs(-5) == 5 True >>> a = 2 >>> ~a >>> from struct import pack >>> pack('b', -1) '\xff' # build-in function for sequence, dict min(), max(), sum(), cmp()