Possible Answers

  1. As many times as you want.
  2. Yes! we've already seen this through examples.
  3. Curly braces are needed to contain the JavaScript statements forming a block.
  4. There are three mistakes in the code
    1. The function name is invalid. The name cannot begin with a numeral.
    2. The pair of parenthesis following the name are missing
    3. In the alert statement, single quotes are used instead of double quotes to close mark the end.
  5. The function consists of four JavaScript statements.
    function some_name()
       {
       alert("some_text");
       window.status='some_message';
       document.bgColor='some_color';
       window.open("url","name","width=300,height=200");
       }
    
  6. If you remember, the text contained in the alert() method is called an argument. We've passed the url, the name and the features as arguments to the open() method of window object. Similarly, functions can take arguments too. The arguments are supplied as a comma separated list. More on this in later sessions.