JSE Certified Entry-Level JavaScript Programmer flashcards
JSE Certified Entry-Level JavaScript Programmer · Build recall with a focused review session.
32 cards. Read the term and the definition here. The deck at the top of this page is optional.
- Hoisting
- Declarations are processed before code runs: var is initialized to undefined, function declarations are fully available, and let/const exist but stay uninitialized in the temporal dead zone.
- Automatic semicolon insertion
- The parser inserts a semicolon at a line break only when the next token cannot continue the statement, which is why a line beginning with a parenthesis can merge with the previous line.
- Strict mode
- Enabled by the directive 'use strict', it makes undeclared assignments throw ReferenceError, forbids duplicate parameter names, and changes this to undefined in plain function calls.
- Temporal dead zone
- The span between entering a block and executing a let or const declaration, during which accessing the binding throws ReferenceError instead of returning undefined.
- Falsy values
- Exactly eight values coerce to false in a boolean context: false, 0, -0, 0n, the empty string, null, undefined, and NaN. Empty arrays and objects are truthy.
- Loose equality coercion
- The == operator converts operands to a common type before comparing: booleans become numbers, strings compared to numbers become numbers, and null equals only undefined.
- Short-circuit evaluation
- The && and || operators stop evaluating once the result is determined and return an operand rather than a boolean, so expressions with side effects may not run.
- Nullish coalescing operator
- The ?? operator returns its right operand only when the left side is null or undefined, unlike || which also falls back for 0, empty string, and false.
- Ternary conditional operator
- The only operator taking three operands: condition ? valueIfTrue : valueIfFalse. It associates right to left and is often used for inline branching.
- Operator precedence
- The fixed ranking that decides evaluation order, from member access and unary operators down through multiplication, addition, comparison, equality, logical operators, and assignment.
- Switch fall-through
- Cases are compared using strict equality and continue executing into later cases until a break, return, or throw exits the switch block.
- for...of loop
- Iterates the values produced by an iterable's iterator, working with arrays, strings, Map, and Set, but throwing TypeError on plain objects that lack Symbol.iterator.
- for...in loop
- Iterates enumerable property keys as strings, including inherited ones, so it is suited to object inspection and generally avoided for arrays.
- Labeled break
- A label before a loop lets break label or continue label target that specific outer loop from inside a nested loop, which plain break cannot do.
- Closure
- A function retains access to variables from the lexical scope where it was created, keeping those variables alive after the outer function has returned.
- Arrow function this
- Arrow functions have no own this; they capture this from the surrounding scope at definition time, so call, apply, and bind cannot change it.
- Default parameters
- A parameter default applies only when the argument is undefined, is evaluated at call time from left to right, and may reference earlier parameters.
- IIFE
- An immediately invoked function expression runs once at definition and creates a private scope; wrapping parentheses are required so it parses as an expression.
- Array length property
- Length equals the highest index plus one and is writable; setting it smaller truncates the array, and setting it larger creates empty slots.
- splice versus slice
- splice(start, count, ...items) mutates the array and returns removed elements; slice(start, end) returns a new shallow copy without changing the original.
- Default array sort
- sort converts elements to strings and compares UTF-16 code units, so numbers order lexicographically unless a comparator such as (a, b) => a - b is supplied.
- Object destructuring
- A binding pattern extracts properties by key, supports renaming with {a: x}, nested patterns, and defaults that apply when the value is undefined.
- JSON.stringify omissions
- Properties whose values are undefined, functions, or symbols are dropped from objects and become null inside arrays; circular references throw TypeError.
- Map versus plain object
- A Map accepts keys of any type, preserves insertion order, exposes size as a property, and provides get, set, has, and delete methods.
- toFixed method
- Number.prototype.toFixed(digits) returns a string rounded to the given decimal places, so the result must be converted back with Number or parseFloat for arithmetic.
- finally block
- Code in finally always runs after try and catch, even when try returns or throws, unless the process exits, making it the place for cleanup.
- TypeError versus ReferenceError
- ReferenceError means an identifier was never declared; TypeError means a value of the wrong type was used, such as calling a non-function or reading a property of undefined.
- Optional chaining
- The ?. operator short-circuits to undefined when the value before it is null or undefined, preventing TypeError when accessing nested properties that may be missing.
- querySelectorAll static list
- It returns a NodeList snapshot matching a CSS selector at call time; later DOM changes are not reflected, unlike live HTMLCollections from getElementsByClassName.
- Event bubbling
- After the target handles an event, it propagates upward through ancestors to the document, so a parent listener can respond to child events.
- preventDefault versus stopPropagation
- preventDefault cancels the browser's default action, such as following a link; stopPropagation halts the event's travel through the capture or bubble phases.
- DOMContentLoaded event
- It fires on document after HTML has been parsed and deferred scripts have run, before images and stylesheets finish, so DOM queries are safe there.