c-- styles for logos and headline links do not modify internet, red, or black styles -->

Intranet Journal   Earthweb  
Events Jobs Premium Services Media Kit Network Map E-mail Offers Vendor Solutions Webcasts

   Intranet Journal Subjects
Search Earthweb

Privacy Policy



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet commerce
Be a Commerce Partner
















 

[ Home | Discussion Forum | How Do I... | Lotus Notes Intranets | Microsoft SharePoint | Products | Shopping  ]

free news!

Some Other JavaScript Sources On IDM
·  JavaScript FAQ
· Basic JavaScript with Examples
·   Javascript Event Handlers
·   Putting JavaScript to Work
·   eXchange Thread: Javascript for Date Last Changed & Y2K
·   JS/Configurator: A Computer Cost Estimator
·   A Look at JavaScript in Microsoft IE vs. Netscape Communicator
·   JavaScript Forms and Frames: Enhancing HTML on the Client Side
·   JS/Configurator: A Computer Cost Estimator

Tutorial: Introduction to JavaScript


By Aaron Weiss

Operators

special 

Several JavaScript operators, rarely used, fall into no particular category. These operators are summarized below.


Conditional operator

(condition) ? trueVal : falseVal

Assigns a specified value to a variable if a condition is true, otherwise assigns an alternate value if condition is false.
Example:
preferredPet = (cats > dogs) ? "felines" : "canines"

If (cats>dogs), preferredPet will be assigned the string value "felines," otherwise it will be assigned "canines".
typeof operand Returns the data type of operand.
Example -- test a variable to determine if it contains a number:
if (typeof total=="number") ...

 

JavaScript Tutorial   [Previous: String and Assignment | Next: Statements]

      

[print version of this page]

IntranetDesignMagazine

 JavaScript Tutorial

Discuss
JavaScript
in the eXchange!


Contents
· VERSIONS OF JAVASCRIPT

· EMBEDDING JAVASCRIPT

· JAVASCRIPT GRAMMAR

· VARIABLES AND DATA TYPES

· OPERATORS
· Arithmetic or Computational
· Comparison
· Boolean
· String and Assignment
· Special
· Statements
· Conditionals
· Loops
· Object Manipulation
· Comments

· FUNCTIONS
· Defining Funtions
· Calling Functions

· OBJECTS
· Document Object Model
· Properties
· Methods
· Creating Objects

· EVENT HANDLERS

· CONCLUSION