Essential JavaScript Flashcards
Who developed JavaScript?
Netscape - Brendan Eich
What are some characteristics of JavaScrippt?
High-level scripting language Case-sensitive Intepreted at runtime (JIT compiler) Object base Loosely typed Platform independent Dynamic language (change on the fly)
What is an object?
Self-contained set of related values and functions
What are properties?
Characteristics of an object (e.g. car.color in the object Car
What is a method?
A function that is a property of an object
Some JavaScript flavors?
ECMAScript
TypeScript
Mocha
JScript (Microsoft)
Microsoft intepretation of JavaScript
JScript
What is Node.JS?
Server-side JS
JavaScript interpreters (browser)
Google V8
Spidermonkey (FireFox)
No Script?
Your browser doesn’t support JavaScript
Type attribute?
What are the primitive data types?
String Number Boolean Undefined Null Symbol
Declare a variable
let myNumber = 10;
Expression
myNumber = 10;
Global Scope
Variables declared outside of a code block (use as little as possible)
Local Scope
Any variable using let or const inside a block
Some Keywords?
const let function class null debugger while var typeof indexof
Some reserved words
boolean type catch false float let null this switch true typeof import
What is hoisting?
Hoisting is JavaScript’s default behavior of moving declarations to the top.
A variable has to start with…
A variable name must start with a letter, underscore ( _ ), or dollar sign ( $ ). A variable name cannot start with a number.
What is instantiation?
Process of creating new copies of an object
+= will….?
Add operands and assign value to the left side
Shorthand for: A = A + B
A += B
How to target paretn of all parent files in a frameset?
Use top
How to evaluate multiple custom objects?
Use function
Events trigger?
functions
LiveWire is?
A server-side solution
Methods operate on ….. instances of an object
single
alert, prompt and confirm are methods of….
the window object
Change image on mouseover is an example of…?
the image object
JS object models groups?
3:
browser
language
form fields
!== means..
not equal to
How to clear cookies?
Add expiration date thas has already passed
parsefloat?
converts number to floating point decimal equivalent
Variable is…?
A space of memory
The constructor is….
the building block of all custom objects
Instantiation is..?
create new instances (copies) of the object (once constructor has been defined)
Do all browser store cookies the same way?
No
A sentence on the page (in JS) is an example of..?
An object
Types of expressions allowed in JS?
Assignment
Arithmetic
String
Logical
Insert a new line
\n
What are the event handlers on the select-object?
onBlur
onFocus
onChange
Operators are used in expressions to…
store or return a value
Instance
real-time objects generated from the empty constructor template
What is the main event handler of the button object?
onClick
Literals are..?
the actual data values you provide in JS
Logical AND
&&
Logical OR
||
Variables can store … date types
5