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