Level 21 Level 23
Level 22

[Quiz] Basics III


23 words 0 ignored

Ready to learn       Ready to review

Ignore words

Check the boxes below to ignore/unignore words, then click save at the bottom. Ignored words will never appear in any learning session.

All None

Ignore?
program flow
instructions by the computer always read each statement one at a time from the top of you program to the bottom.
quick review
conditional statements - if, if/else
Lexical Structure
the set of elementary rules that specifies how you write programs in that language
Literals
Fixed values are called _______
Identifiers are...
...names used to identify variables, keywords and functions; provide labels for certain loops in JS
Reserved words
Keywords that are reserved for the language itself and cannot be used as variable names
What is the general rule about how JS interprets whitespace at the end of a line?
JS treats the end of a line as a semicolon if it can't parse the second line as a continuation of the first.
Primitive and objects
Two categories for JS types
Types
The kinds of values that can be stored and manipulated in a programming language
What are the five primitive types?
numbers, strings, boolean, null and undefined; everything else is an object
Definition of an object
A collection of properties where each property has a name and a value
Constructor
A function that is written with the new keyword to initialize a newly created object
Class
When you make a new constructor, you are making a _______
Null and undefined
What are the only values that cannot have methods invoked on them?
Mutable vs immutable
A value of a mutable type can change
What data types are immutable?
numbers, strings, booleans, null and undefined are immutable
What does it mean that JS variables are untyped?
You can assign a value of any type to a variable and you can later assign a value of a different type to the same variable
JS returns infinity or negative infinity
When a value becomes larger than the largest presentable number, what happens?
Underflow
When the result of a numeric operation is closer to zero than the smallest representable number. In this case, JS returns zero
Infinity or negative infinity
What does division by zero return?
returns NaN
What does zero divided by zero return?
Not equal!
How does NaN compare to any other value including itself?
Why do floating point numbers only give an approximation of the accurate number?
Because most calculations require decimal numbers and Javascript uses binary numbers, meaning the calculations are close, but may be rounded differently causing problems when you compare numbers for equality