BitOr
Performs a bitwise logical OR operation.
Method Signature
BitOr(number1=[integer], number2=[integer])
Arguments
Argument
Type
Required
Description
Default
number1
integer
true
Numeric value for bitwise OR.
number2
integer
true
Numeric value for bitwise OR.
Examples
Calculate bitwise logical OR
Uses the bitOr function to perform the logical OR operation on each pair of the corresponding bits
bitOr( 5, 3 );
Result: 7
Additional Examples
writeOutput( bitOr( 4, 128 ) );
writeOutput( "<br>" );
writeOutput( bitOr( 10, 0 ) );
Related
Last updated
Was this helpful?