Lect15Functions - maximum value possible Number.MIN_VALUE...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Announcements Check class announcements daily You must implement programming projects by yourself 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Confirm confirm function returns true if the user selects OK and false for Cancel Example: Confirm.html
Background image of page 2
3 Additional Operators Compound assignment operators += -= *= /= %=
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4 What is a function prototype? Function Prototypes
Background image of page 4
5 Data Types Primitive data types in JavaScript Numbers Strings Booleans Composite Data Types Objects Arrays All numbers are represented as floating-point values. To represent a single character using a string of length 1 You can use ‘ ‘ or “ “ for strings although we will use “ “ in this class Remember floating-point values are approximations Special numeric values Infinity Number.NaN Not a Number Number.MAX_VALUE
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: maximum value possible Number.MIN_VALUE smallest (closest to zero) number Number.POSITIVE_INFINITY Number.NEGATIVE_INFINITY Example: NumericValues.html 6 Generation of Random Values Example: RandomValues.html 7 Throwing Dies Define a function that returns a number between 1 and 6 simulating the throwing of a die Define a second function that simulates throwing two dies Assume we have images named 1.gif, 2.gif, , 6.gif. Display the appropriate images after throwing the dies 8 Functions as Data In JavaScript functions are considered data. That means they can be assigned to variables, passed as arguments to functions, etc. Example: FunctionsAsDataI.html, FunctionsAsDataII.html...
View Full Document

Page1 / 8

Lect15Functions - maximum value possible Number.MIN_VALUE...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online