Download presentation
Presentation is loading. Please wait.
Published byImogen Malone Modified over 9 years ago
1
Chapter 2 Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc.Slide 1
2
Objectives Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 2
3
Objectives (continued) Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 3
4
Objectives (continued) Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 4
5
Two attributes of the script element Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 5
6
A script element that embeds JavaScript in the head section Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 6
7
Terms Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 7
8
JavaScript in the body of an HTML document Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 8
9
The result of the JavaScript in a web browser Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 9
10
A noscript element in the body of the HTML Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 10
11
A block of JavaScript code Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 11
12
The basic syntax rules for JavaScript Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 12
13
How to split a statement over two or more lines Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 13
14
Rules for creating identifiers Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 14
15
Valid identifiers in JavaScript Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 15
16
Camel casing versus underscore notation Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 16
17
Naming recommendations Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 17
18
JavaScript code that includes comments Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 18
19
The syntax rules for JavaScript comments Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 19
20
Guidelines for using comments Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 20
21
Terms Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 21
22
Common methods of the window object Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 22
23
A statement that calls the prompt method with the object name omitted Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 23
24
One property of the window object Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 24
25
Terms related to objects Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 25
26
Number, string, and Boolean values Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 26
27
Terms related to data types Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 27
28
Common arithmetic operators Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 28
29
The order of precedence for arithmetic expressions Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 29
30
Terms related to numeric expressions Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 30
31
The most useful assignment operators Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 31
32
How to code compound assignment statements Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 32
33
Three ways to increment a counter variable Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 33
34
A floating-point result that isn’t precise Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 34
35
Terms for working with variables Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 35
36
The concatenation operator for strings Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 36
37
Escape sequences that can be used in strings Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 37
38
How to declare string variables Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 38
39
How to code compound assignment statements Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 39
40
How escape sequences can be used in a string Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 40
41
How to declare Boolean variables and assign values to them Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 41
42
Terms for string expressions Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 42
43
How JavaScript interprets the plus sign in mixed expressions Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 43
44
Two methods of the window object for converting string values Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 44
45
The same examples with chaining Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 45
46
Terms Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 46
47
The relational operators Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 47
48
The syntax of the global isNaN method Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 48
49
The logical operators in order of precedence Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 49
50
Terms for conditional expressions Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 50
51
The syntax of the if statement Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 51
52
An if statement with else if and else clauses Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 52
53
An if statement with a compound conditional expression Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 53
54
How to test a Boolean variable Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 54
55
The syntax of a while loop Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 55
56
The syntax of a do-while loop Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 56
57
A while loop that gets the average of numbers Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 57
58
The syntax of a for statement Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 58
59
A for loop that calculates future value Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 59
60
Terms for conditional statements Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 60
61
The Calculate MPG application Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 61
62
The Calculate MPG application (continued) Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 62
63
The HTML and JavaScript for the application Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 63
64
The dialog boxes for the Test Scores application Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 64
65
The Test Scores application (continued) Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 65
66
The JavaScript in the HTML head section Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 66
67
The Firefox Error Console with an error Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 67
68
How to display the Firefox Error Console and the source code for an error Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 68
69
Common syntax errors Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 69
70
Extra 2-1: Convert number grades to letter grades Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 70
71
Extra 2-1: (continued) Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 71
72
Extra 2-2: Convert Fahrenheit to Celsius Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 72
73
Extra 2-3:Calculate income tax Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 73
74
Extra 2-3: (continued) Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 74
75
Short 2-1: Enhance the Test Scores application Murach's JavaScript and jQuery, C2© 2012, Mike Murach & Associates, Inc. Slide 75
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.