January 2018
Intermediate to advanced
678 pages
20h 16m
English
We still haven’t finished with the Hello web page. Actually, we still haven’t explained the magic behind how the web page replaces the initial message with “Hello, world!” when the user clicks the button. To understand how that works, we need to talk about assignment statements and objects.
Once again, here’s the Hello web page’s displayHello function:
In the function’s body, the first statement is a variable declaration for the msg variable. After you declare a variable, you’ll want to use it, and the first step in using a variable is to put a value inside it. An assignment statement puts/assigns a value ...
Read now
Unlock full access