Basic HTML version of Foils prepared 23 June 1997

Foil 22 JavaScript Expressions - II

From JavaScript Tutorial for Certificate Course UC Web applications Certificate -- Summer 97. by Geoffrey C. Fox, Tom Scavo

String Operators: the Concatenation Operator
Bitwise logical operators: & (AND) | (OR) ^ (XOR) operate on two numbers expressed in 32-bit integer form and perform indicated logical operation on each bit separately
<< is bitwise left shift discarding bits at left (high order) and zero filling at right
>> is bitwise right shift propagating the sign bit in high order (position 31)
>>> is zero fill right shift with no special treatment of sign bit
Boolean operators are && (AND), || (OR), ! (NOT) and can only operate on boolean variables that are true or false
Relational operators are == > >= < <= != which can be used on numeric or string variables
Concatenation operator (+) joins two strings together:
x = "Hello "; y = "World!";
// x + y is "Hello World!"
  • Note + is written . in PERL



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed Apr 1 1998