• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Summary

Operators are truly understood and appreciated only with use and practice. Most debugging of JavaScript is a matter of looking to make sure that all of the characters that make up the bulk of operator symbols are the correct ones and that they are placed where they belong. Of course, memorizing which ones do what is important, but so many of them depend of the context of their use that only lots of practice and debugging work leads to optimum use.

In this chapter and previous chapters, operators were used in the context of legal JavaScript statements. The next chapter examines the different statements that have been used, plus others not yet used in examples. As you will see, doing them effectively requires using them in concert with the set of operators from this chapter. All of the actions in the expressions are controlled by the operators and, in the context of a statement, JavaScript performs different actions.

When a designer understands the JavaScript basics, he is in a position to begin thinking about how to use variables, operators, and data to communicate with the viewer. By recording what the user does in variables, the site can respond in ways limited only by the designer’s imagination. For example, if the user moves the mouse over one position, that movement can be placed in the variable alpha simply by changing the value of alpha to record the movement. Likewise, if the user moves to another position, the movement can be recorded in a different variable, beta. Later in the book, you will see how all different types of input from the mouse and keyboard can be used in site design to individualize feedback to viewers based on their movement on the page.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint