HTML and CSS Reference
In-Depth Information
Figure 3.7
Firefox 3.5.7 supports the
const
keyword.
Figure 3.8
Internet Explorer 8 does not support the
const
keyword.
Try to declare all your variables at the beginning of the program, even if you don't have val-
ues for them yet. This will help you find misspelled names faster. Watch that you use proper
variable names. Don't used reserved words and words that are too long to remember or type
easily. Remember that variable names are case sensitive.
MyName
is not the same as
myName
. Avoid giving two variables similar names, such as
MyName
and
myNames
. Avoid
one-character differences in variable names, such as
Name1
and
Names1
. Even though you
aren't always required to use the
var
keyword, do it anyway. It's safer. And, of course, be sure
that the variables you use are spelled properly throughout the script.
When you use strings don't forget to enclose the strings in either double or single
quotes. Quoting will get the best of programmers every time!