Java Reference
In-Depth Information
As soon as you load this into your web browser, it should show an alert box with “Hello” in it, as
shown in Figure 2-1. This is the content of the variable myFirstVariable at that point in the code.
figure 2-1  
Click OK and another alert box appears with 54321 in it, as shown in Figure 2-2. This is the new
value you assigned to the variable myFirstVariable .
Within the script block, you first declare your variable:
var myFirstVariable;
figure 2-2  
Search WWH ::




Custom Search