1/19
Flashcards reviewing key Javascript concepts
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
JavaScript (JS)
A high-level programming language, one of the core technologies of the World Wide Web, enabling interactive web pages and applications; can be executed on the server and on the client.
Dynamic Programming Language
JavaScript is a dynamic programming language where operations done at compile-time can be done at run-time, allowing changes to variable types or adding new properties/methods during program execution.
Node.js
A server-side JavaScript runtime built on the Chrome V8 JavaScript engine, including the NPM package manager for installing node packages.
Identifiers
A sequence of characters identifying a variable, function, or property in code; case-sensitive and can contain Unicode letters, $, _, and digits (0-9), but cannot start with a digit.
Variable Values
Variables store data values; non-primitive values are references. Undefined variables are declared but not assigned, while undeclared variables haven't been declared at all.
Variable Declaration Keywords
let, const, and var are used to declare variables. Let allows reassignment, const does not allow modification after assignment and var defines a variable in the function scope regardless of block scope.
Variable Scopes
Global scope is outside any function or block. Functional scope is within a function. Block scope is for variables declared with let and const.
Dynamic Typing
Variables in JavaScript can be assigned and re-assigned values of all types (number, string, boolean)
Functions
Named list of instructions (statements and expressions). Can take parameters and return a result.
Object Methods
Functions that operate from the context of the object, accessed as a property using dot-notation; JavaScript includes a large standard library.
Arithmetic Operators
Operators that take numerical values as operands and return a single numerical value. Examples: Addition (+), Subtraction (-), Multiplication (), Division (/), Remainder (%), Exponentiation (*).
Assignment Operators
Operators that assign a value to its left operand based on the value of the right operand. Shorthand operators include +=, -=, *=, /=, %=, and **=.
Comparison Operators
Operators used to compare values, including EQUAL (==), EQUAL value and type (===), NOT EQUAL value (!=), NOT EQUAL value or type (!==), GREATER than (>), GREATER than OR EQUAL (>=), LESS than (<), LESS than OR EQUAL (<=).
Truthy and Falsy Values
Values that coerce to true (truthy) or false (falsy) when evaluated in a boolean context. Falsy values include false, null, undefined, NaN, 0, 0n, and "".
Logical Operators
Operators that perform logical operations: && (logical AND), || (logical OR), and ! (logical NOT).
Typeof Operator
An operator that returns a string indicating the type of an operand.
First-class Functions
Functions can be passed as arguments to other functions, returned by other functions, and assigned as a value to a variable.
Nested Functions
Functions that are held within other functions; inner functions have access to variables from their parent functions.
Hoisting
Variable and function declarations are put into memory during the compile phase, but stay where you typed them in your code; only declarations are hoisted.
Debugging - Strict Mode
Strict mode limits certain "sloppy" language features; silent errors will throw Exceptions instead. Enabled by default in modules.