JavaScript P1 Flashcards
JavaScript is related to Java T/F
False
JavaScript is not______, it is ________.
compiled, interpreted
Loosely-typed
variable types are assigned at runtime
Undefined (keyword)
declared but not defined
Not Defined (keyword)
not defined or declared
Primitive Datatypes
undefined boolean number string bigint symbol null
falsy types
-0 0 undefined false " " NaN
truthy types
true
1
object
everything else that isn’t falsy
null
special primitive type having additional usage for its value: if object is not inherited, then null is shown
typeof()
returns the type of the ‘thing’ in ()
type coercion
changes the type of a variable when it is defined in another location
Arrays
variable in length and type
Functions: Three Invocations
Function form
Constructor form
Method form
Function form
“this” refers to the global object
no overloading
Constructor form
“this” refers to the object being made