alert("Welcome, " + name);
window.close( );
These client-side function calls are expressions, but they also
affect the web browser, so they are statements, too. If a function
does not have any side effects, there is no sense in calling it,
unless it is part of an assignment statement. For example, you
wouldn't just compute a cosine and discard the result:
Math.cos(x);
Instead, you'd compute the value and assign it to a variable
for future use:
cx = Math.cos(x);
Again, please note that each line of code in each of these examples
is terminated with a semicolon.