FunctionsRandom

FunctionsRandom - Number.POSITIVE_INFINITY...

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

View Full Document Right Arrow Icon
ANNOUNCEMENTS No posting of code in the forum Check class announcements daily 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 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 maximum value possible Number.MIN_VALUE smallest (closest to zero) number
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
Background image of page 4
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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Number.POSITIVE_INFINITY Number.NEGATIVE_INFINITY Example: NumericValues.html 3 GENERATION OF RANDOM VALUES Example: RandomValues.html 4 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 5 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 IN-CLASS LAB (20 MINUTES) 6...
View Full Document

Page1 / 6

FunctionsRandom - Number.POSITIVE_INFINITY...

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

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