JavaScript operators look a lot like those in C++ or Java, but with some unusual twists.

JavaScript operators will in general handle any mixture of data types.


Like most programming languages, JavaScript has boolean or "logical" operators.


JavaScript has the standard set of numeric operators, and a few others, too.


Occasionally integers may need to have their bits manipulated, and JavaScript provides the necessary tools.


Joining strings is frequent enough in JavaScript to benefit from its own operator.


Comparison of two values is very common when programming, but in JavaScript it may not always be what you expect.


With so many operators around, they must take turns!


To work with JavaScript, no special tools are required, just a text editor to write scripts into a .html file (the source view of Dreamweaver can also be used), and a web browser to view the result.


  1. Following the example of the Amherst College Founding, create a web page that calculates how old you are and displays the result in the page.
     
  2. Following the example of the College Check, create a web page that uses a form with a text input, providing a number of years in the property this.value, and calculate the year when you will be that age. Use the method window.alert('string') to display the result.