Mission Logs
The three main server-side storage options are the filesystem, relational databases, and document (NoSQL) databases.
Option
Description
Filesystem
Store data in files (XML, JSON, proprietary formats)
Relational DB
Tables with rows, linked via relationships, SQL queries...
Q How does the HTML5 Constraint Validation API work?
The Constraint Validation API lets you check whether an input meets its HTML constraints via checkValidity() and inspect the result through the validity object and validationMessage.
Key method: checkValidity()
const input = document.querySelector("#email");
if (input.checkValid...
Q What does this refer to in an event handler?
In a regular-function handler this is the element the listener is attached to, but in an arrow function this keeps the outer scope's value — use event.currentTarget instead.
button.addEventListener("click", function() {
// The button element
console.log(this);
this.di...
Q What are latitude and longitude?
Latitude is your north-south position from -90° to +90° (0° at the equator); longitude is your east-west position from -180° to +180° (0° at Greenwich).
Coordinate
Range
Reference
Latitude
-90° to +90°
Equator = 0°
Longitude
-180° to +180°
Greenwich meridian = 0°
Exam...
Q What is a responsive layout?
A responsive layout is a single design that reflows at width-based breakpoints so it stays usable from phone to desktop.
W3.CSS breakpoints:
Size
Width
Typical Device
Small (s)
< 601px
Phone
Medium (m)
601px - 992px
Tablet, small laptop
Large (l)
> 992px
Laptop, deskto...
Q What are the three built-in dialog box functions in JavaScript?
alert, confirm, and prompt pop up simple browser dialogs — to show a message, ask a yes/no question, or collect a line of text.
These are the quickest way to interact with a user, with no HTML needed. Each shows a small pop-up and returns a different kind of value:
Function
Pu...
Q How does position: relative differ from position: absolute?
relative nudges an element from where it would normally sit while keeping its space reserved; absolute rips it out of the flow and positions it against an ancestor.
With position: relative, the element stays in the document flow — its original gap is held open, and offsets like t...
Q What is the difference between align-items and align-content in Flexbox?
align-items positions each item within its own line on the cross axis; align-content positions the whole stack of wrapped lines on the cross axis.
Both work along the cross axis (vertical, for a row), but at different scales. align-items answers "where does each item sit inside i...
Q What is the difference between a JavaScript library and a framework?
You call a library's functions, whereas a framework provides the overall structure and calls your code (inversion of control).
Library
Framework
You call library functions
Framework calls your functions
You control program flow
Framework controls program flow
Add featu...
Q How do you write conditional statements in JavaScript, and what operators do conditions use?
You use if / else to run code only when a condition is true, building conditions from comparison operators (===, >, ...) and logical operators (&&, ||, !).
A conditional lets a program make decisions: run one block of code when a condition holds, and (optionally) another when it...