10/06/2005 P. Conrad, CISC103 Lecture Notes (0) Discussions (a) Need more clarity about submission of lab assigments concern that some completed labs are getting 0 or 1 not 2, because of misunderstandings Suggested solution: clear directory naming convention username, labnumber, checklist of which files are needed... (b) Question: what's on the midterm Today's answer: "everything above the line" line is the line on calendar below week of 10/09 and above the week of 10/16 Suggestion: material in the Ess Design series "sticks better" because you are doing something with it So better to emphasize that material on the exam... Some things from Chapter 7 of the Pink Book you should definitely know for the exam (these come from Self-Review Exercise 7.5 and 7.6... the complete solution is in the book, and also online as Ex07.06.product.html (1) How to declare variables in JavaScript e.g. var x; // declare one variable var x, y, z, result; // declare a list of several variables (1a) Know that every statement should end in a semicolon (2) How to prompt for a value var xVal; xVal = window.prompt("Enter first integer:",0); // note that this gets the value of xVal AS A STRING // note that "prompt" is a "method" of the "window object". (3) How to convert a string value to a numeric value x = parseInt(xVal); // Note that we call parseInt a "function" rather than // a "method" because it is not invoked using the "dot notation" // in the same way that document.writeln() or window.prompt() are. // Rule: all methods are functions, but not all functions are methods. (4) How to do math with an assignment statement: var result; result = x * y * z; (5) How to print out a result into the document: document.writeln("