Web site construction - 1138 Part IV . JavaScript Core Language Reference
1138 Part IV . JavaScript Core Language Reference segment easier to find. For example, you can define a comment block above each function and describe what the function is about, as in the following example. /*———————————————- calculate() Performs a mortgage calculation based on parameters blah, blah, blah. Called by blah blah blah. ———————————————–*/ function calculate(form) { statements } const NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . The const keyword initializes a constant. Unlike a variable, whose data is subject to change while a page loads, a constant s value cannot be modified once it is assigned. It is common practice in many programming languages to define constant identifiers with all uppercase letters, usually with underscore characters to delimit multiple words. This style makes it easier to see a constant s application later in the program. Listing 42-3 shows how you can use a constant. The page conveys temperature data for several cities. (Presumably, this data is updated on the server and fashioned into an array of data when the user requests the page.) For temperatures below freezing, the temperature is shown in a distinctive text style. Because the freezing temperature is a constant reference point, it is assigned as a constant. Listing 42-3: Using the const Keyword