bbb Home
Operators Contents        

OPERATORS

UNARY OPERATORS


EXAMPLE

Font: 8pt   12pt   20pt   24pt   Width: Min. 50%   75%   100%   

PRACTICE

  1. Test the operators on strings (for example... alert("f"*"g"))
  2. Create a page with two textboxes and a button. Create a function that is called on the "onclick" event of the button. Add code to the function so that:
    1. The contents of the textboxes are added together and displayed in an alert.
    2. One textbox is subtracted from the other and the result displayed in an alert.
    3. The textboxes are multiplied and the result is displayed in an alert.
    4. The remainder of the two textboxes is displayed in an alert.
  3. Write code that keeps track of the number of times that a user clicks on a page.

SELF-QUIZ