Home
What's New
Dev Tools
Services
Feedback
Site Map

Interesting JavaScript Discoveries

Every language has its own idiosyncrasies -- ways that this language behaves differently from expected.   This is my own list of discoveries that I made in the first few months of using JavaScript.

SYNTAX

It is almost amusing that JavaScript is so loose in many respects (variable declaration, data types, function parameters, etc.) but so tight in other respects (case sensitivity).  The developer must simply learn where it is "tight" and be sure to conform.

VARIABLES

Experienced developers will probably find the JavaScript's "looseness" around variables to be its most shocking feature.  Variables are discussed in more detail elsewhere however the some points will be restated here:

if (!isNaN(document.formMain.txtNum.value)) { // valid number
  document.formMain.txtNum.value = document.formMain.txtNum.value * 1;
} else {
  // appropriate error (non-numeric in numeric field)
}

FUNCTIONS

STATEMENTS

IF

SWITCH

OBJECT REFERENCES

FORM ELEMENTS

Selection List

... back to JavaScript Topics


Copyright 1997-2017, Woodger Computing Inc.