Workspace Solution Engineering Glossary
Google Apps Script
Google-hosted JavaScript plus service APIs for automating Workspace.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Google Workspace
Google productivity products such as Sheets, Docs, Drive and Gmail.
Automation repeats a defined rule on data. A reliable rule names its input, validates assumptions, changes only intended records and gives evidence of its effect. A computer does not infer that Pending means Complete. Writing B2:B4 changes three status cells in one explicit operation. The before-and-after view lets you verify both affected and unaffected cells.
A rectangular range can contain several cells; one scalar value is written to every cell.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2:B4").setValue("Ready");
}Bound script
An Apps Script project attached to a host spreadsheet, document, form or presentation.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Standalone script
A script project created independently, typically opening target resources by ID.
getSheetByName accepts the exact tab name and returns a Sheet or null. Check null before invoking another method. An active spreadsheet exists only in suitable contexts; standalone scripts should open a configured ID. IDs are opaque identifiers, not the visible name. Fictional IDs work only in the local adapter.
Case and spelling matter. The explicit guard gives a useful message instead of a null-property error.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const book = SpreadsheetApp.getActiveSpreadsheet();
const sheet = book.getSheetByName("Sales");
if (!sheet) throw new Error("Sales sheet missing");
console.log(sheet.getName());
}Spreadsheet
A workbook containing one or more sheet tabs.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Sheet
One grid tab inside a spreadsheet; its name is not the workbook ID.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Range
A rectangular selection of cells on a sheet.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}A1 notation
A range address such as B2 or A2:C5, using letters for columns and one-based rows.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Spreadsheet ID
An opaque identifier used to open a workbook; not its visible title.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}File ID
A stable identifier for a Drive resource even when it is renamed.
A file ID identifies one resource while a name can be duplicated. A folder is a container, not a path string accepted by getFileById. Access depends on the executing account’s permissions. Store validated IDs in configuration and show clear errors for missing resources. The local tree uses stable fictional IDs and has no connection to Drive.
The stable ID returns the correct file even if its visible name later changes.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const file = DriveApp.getFileById("brief");
console.log(file.getId());
console.log(file.getName());
console.log(file.getMimeType());
}Document tab
A document content container accessed explicitly through a Tab and DocumentTab.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Service
A named Apps Script interface to a product or utility, such as SpreadsheetApp.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Method chaining
Calling a method on the object returned by the preceding call.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Authorization
Permission for code to use account data under a defined identity.
Authorization is permission granted for a script to use services on someone’s behalf. Console messages do not grant access. A successful log is not proof that every external side effect succeeded. Inspect state and exceptions as well. The simulation never requests Google authorization. In a real project inspect the requested scopes, the account and the code before approving access; organization administrators can restrict services.
The normal sequence reaches Finished. An exception interrupts subsequent statements; it is not a Google authorization dialog.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
console.log("Starting");
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
console.log(sheet.getName());
console.log("Finished");
}OAuth scope
A declared capability requested by a script for access to Google services.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Execution identity
The account authority under which an operation runs.
An event object describes an occurrence; it does not prove that the current viewer is authorized to perform every operation. Installable triggers run as their creator, while simple triggers have additional restrictions. User identity can be unavailable in some contexts. Treat event fields as optional and validate required inputs before acting.
The prepared onEdit event has a range and a labeled auth-mode fixture; it is not a real account identity check.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
if (!e) throw new Error("Select a prepared event");
console.log(e.authMode);
console.log(Boolean(e.range));
}Simple trigger
A reserved event function such as onOpen or onEdit with restricted capabilities.
Simple triggers run with restrictions and are not a general replacement for authorized installable triggers. A manual click on Run does not supply an event object automatically. Here the event selector prepares e explicitly. Use e.range to identify the edited cell and handle missing e with a clear guard. Avoid assuming every cell edit has a scalar e.value.
The prepared edit event identifies row two. Selecting Manual deliberately tests the missing-event guard.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
onEdit(e);
}
function onEdit(event) {
if (!event || !event.range) throw new Error("Choose an onEdit event");
console.log(event.range.getRow());
console.log(event.value);
}Installable trigger
An explicitly created event or schedule handler that runs as its creator.
Simple triggers run with restrictions and are not a general replacement for authorized installable triggers. A manual click on Run does not supply an event object automatically. Here the event selector prepares e explicitly. Use e.range to identify the edited cell and handle missing e with a clear guard. Avoid assuming every cell edit has a scalar e.value.
The prepared edit event identifies row two. Selecting Manual deliberately tests the missing-event guard.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
onEdit(e);
}
function onEdit(event) {
if (!event || !event.range) throw new Error("Choose an onEdit event");
console.log(event.range.getRow());
console.log(event.value);
}Time-driven trigger
An installed schedule that invokes a server function without an open browser.
A spreadsheet form-submit event supplies values and namedValues; a Form-bound event supplies response. Their handlers are not interchangeable. Test each event shape and document which trigger to install. A time-driven event is not a row submission and has no submitted values. This example expects the spreadsheet variant only.
The prepared event’s second value is the person’s name; the first is a timestamp.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
if (!e || !Array.isArray(e.values)) throw new Error("Choose Spreadsheet form submission");
console.log(e.values[1]);
SpreadsheetApp.getActiveSpreadsheet().getActiveSheet().appendRow([e.values[1], "Registered"]);
}Event object
Input supplied by a trigger, whose fields depend on the event source.
Simple triggers run with restrictions and are not a general replacement for authorized installable triggers. A manual click on Run does not supply an event object automatically. Here the event selector prepares e explicitly. Use e.range to identify the edited cell and handle missing e with a clear guard. Avoid assuming every cell edit has a scalar e.value.
The prepared edit event identifies row two. Selecting Manual deliberately tests the missing-event guard.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
onEdit(e);
}
function onEdit(event) {
if (!event || !event.range) throw new Error("Choose an onEdit event");
console.log(event.range.getRow());
console.log(event.value);
}onEdit
A spreadsheet edit handler; programmatic cell writes do not automatically invoke it.
A trigger invokes a named function in response to an event or schedule. Creating a trigger is not the same as firing it. The simulator records trigger definitions and uses a separate event selector to invoke handlers. Script-driven sheet edits do not automatically fire onEdit. Avoid installing duplicate triggers each time setup runs.
A daily trigger definition is stored. The report handler is not executed by setup itself.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
ScriptApp.newTrigger("dailyReport").timeBased().everyDays(1).atHour(9).create();
console.log(ScriptApp.getProjectTriggers().length);
}
function dailyReport() { console.log("Daily report started"); }onOpen
A host-open handler commonly used to add a custom menu.
Simple triggers run with restrictions and are not a general replacement for authorized installable triggers. A manual click on Run does not supply an event object automatically. Here the event selector prepares e explicitly. Use e.range to identify the edited cell and handle missing e with a clear guard. Avoid assuming every cell edit has a scalar e.value.
The prepared edit event identifies row two. Selecting Manual deliberately tests the missing-event guard.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
onEdit(e);
}
function onEdit(event) {
if (!event || !event.range) throw new Error("Choose an onEdit event");
console.log(event.range.getRow());
console.log(event.value);
}Form submission event
An occurrence with different structures for a Form source and a linked Sheet source.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Named values
A spreadsheet form-submit mapping from question titles to submitted value arrays.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}HTML Service
Apps Script output and templates for dialogs, sidebars and web pages.
HTML Service returns an HtmlOutput object, not a live DOM in server JavaScript. Display it through a bound editor UI or return it from doGet for a web app. Keep untrusted data out of raw HTML strings unless escaped. The academy preview is sandboxed and cannot access parent storage or Google services.
A dialog record contains the title and authored HTML. No actual Google dialog opens locally.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const output = HtmlService.createHtmlOutput("<h1>Review report</h1><p>Check totals before export.</p>");
SpreadsheetApp.getUi().showModalDialog(output, "Report review");
}Sidebar
A client HTML interface displayed beside a host editor document.
A sidebar is an HTML interface beside the host document. Its client JavaScript runs separately from server Apps Script. Use google.script.run callbacks for server data, not direct SpreadsheetApp calls in the page. The Web Application Studio provides an actual local asynchronous bridge for supported examples.
The sidebar state contains a distinct interface, while server and client environments remain separate.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const output = HtmlService.createHtmlOutput("<h2>Administration</h2><p>Review sample records.</p>");
SpreadsheetApp.getUi().showSidebar(output);
}Custom menu
Host editor commands mapping readable labels to server function names.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}CardService
The card UI API used for supported Google Workspace add-on experiences.
Editor add-ons and Google Workspace add-ons use different UI models and publication requirements. HTML sidebars are not interchangeable with CardService cards. Host applications expose different capabilities. This sample builds a card structure locally; installing it requires a reviewed add-on manifest and host-specific entry point in Google.
A card has a header and section with a text widget. The structural JSON is not an installed add-on.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const section = CardService.newCardSection().addWidget(CardService.newTextParagraph().setText("Review automation before applying changes."));
const card = CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle("Discovery toolkit")).addSection(section).build();
console.log(JSON.stringify(card));
}Editor add-on
An extension of an editor with its own UI, authorization and publishing requirements.
Editor add-ons and Google Workspace add-ons use different UI models and publication requirements. HTML sidebars are not interchangeable with CardService cards. Host applications expose different capabilities. This sample builds a card structure locally; installing it requires a reviewed add-on manifest and host-specific entry point in Google.
A card has a header and section with a text widget. The structural JSON is not an installed add-on.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const section = CardService.newCardSection().addWidget(CardService.newTextParagraph().setText("Review automation before applying changes."));
const card = CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle("Discovery toolkit")).addSection(section).build();
console.log(JSON.stringify(card));
}Workspace add-on
A host-specific card-based integration with distinct manifest and event contracts.
Editor add-ons and Google Workspace add-ons use different UI models and publication requirements. HTML sidebars are not interchangeable with CardService cards. Host applications expose different capabilities. This sample builds a card structure locally; installing it requires a reviewed add-on manifest and host-specific entry point in Google.
A card has a header and section with a text widget. The structural JSON is not an installed add-on.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const section = CardService.newCardSection().addWidget(CardService.newTextParagraph().setText("Review automation before applying changes."));
const card = CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle("Discovery toolkit")).addSection(section).build();
console.log(JSON.stringify(card));
}Web application deployment
A published Apps Script HTTP entry with selected audience and execution identity.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}doGet
The server entry point for a web application GET request, returning supported output.
HTML Service returns an HtmlOutput object, not a live DOM in server JavaScript. Display it through a bound editor UI or return it from doGet for a web app. Keep untrusted data out of raw HTML strings unless escaped. The academy preview is sandboxed and cannot access parent storage or Google services.
A dialog record contains the title and authored HTML. No actual Google dialog opens locally.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const output = HtmlService.createHtmlOutput("<h1>Review report</h1><p>Check totals before export.</p>");
SpreadsheetApp.getUi().showModalDialog(output, "Report review");
}doPost
A server entry point for HTTP POST requests with explicit validation and output.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}google.script.run
An asynchronous HTML-service bridge from browser code to allowed server functions.
A sidebar is an HTML interface beside the host document. Its client JavaScript runs separately from server Apps Script. Use google.script.run callbacks for server data, not direct SpreadsheetApp calls in the page. The Web Application Studio provides an actual local asynchronous bridge for supported examples.
The sidebar state contains a distinct interface, while server and client environments remain separate.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const output = HtmlService.createHtmlOutput("<h2>Administration</h2><p>Review sample records.</p>");
SpreadsheetApp.getUi().showSidebar(output);
}Success handler
A callback that consumes a completed server return value.
A success handler receives a server result; a failure handler receives an error. Do not read a result synchronously from google.script.run. Responses can arrive out of request order, so disable dependent actions or use request IDs. Dates and functions are not permitted bridge parameters; serialize dates deliberately. This server fixture is used by the working studio bridge.
The serialized object reports the two total tasks and the one open task.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
console.log(getSummary());
}
function getSummary() {
const rows = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Tasks").getDataRange().getValues().slice(1);
return {count: rows.length, open: rows.filter(row => row[1] === "Open").length};
}Failure handler
A callback for a rejected asynchronous server call.
google.script.run is asynchronous and returns control before the server result arrives. Register success and failure handlers, pass supported serializable data, and update the page in the callback. Server functions ending in an underscore are private to client calls. The server example returns data; open the Web Application Studio to exercise the paired client.
The callable server function returns all three people without the header, ready for a client success handler.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
console.log(getPeople());
}
function getPeople() {
return SpreadsheetApp.getActiveSpreadsheet().getSheetByName("People").getDataRange().getValues().slice(1);
}Script Properties
String configuration shared by script executions, visible to sufficient project editors.
Treat transport failure, HTTP failure, parsing failure and schema failure as separate diagnoses. Retry only suitable transient failures with bounded attempts and delays. Keep credentials in reviewed server configuration, and remember project editors may read Script Properties. This example validates an allowlist rather than treating every parsed category as trusted.
An allowed category passes. The failure lab can independently inject HTTP or JSON errors.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const response = UrlFetchApp.fetch("https://example.com/fixture", {muteHttpExceptions: true});
if (response.getResponseCode() !== 200) throw new Error("Provider unavailable");
const data = JSON.parse(response.getContentText());
if (!["support", "praise", "bug"].includes(data.category)) throw new Error("Unsupported category");
console.log(data.category);
}User Properties
String settings scoped to a user in Google rather than all script users.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Document Properties
Document-scoped properties available only in supported project contexts.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Script lock
A coordination primitive for cooperating script executions sharing a script lock.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Checkpoint
A saved processing position or identifier allowing a bounded batch to resume.
Read source records once and create one document per intended record. Give each output a meaningful name and record its ID for recovery. Large batches need checkpoints and duplicate protection. A document generated with the wrong column mapping can look plausible, so verify actual names and amounts in the outputs, not merely the file count.
Each customer gets a distinct document derived from the corresponding row, without altering Sales.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sales");
const rows = sheet.getDataRange().getValues().slice(1);
rows.forEach(row => {
const doc = DocumentApp.create("Statement - " + row[0]);
doc.getTabs()[0].asDocumentTab().getBody().appendParagraph(row[0] + " owes " + row[1]);
});
}Idempotency
A property of an operation whose repeated execution has the intended same net effect.
A write replaces existing cell content. Read the old value when the update depends on it, compute locally and write deliberately. A setValue call is not a database transaction. Concurrent executions may need a cooperating lock and idempotency design. This introductory sample changes one amount and verifies the stored result.
The calculation uses the numeric input 120 and stores 130, leaving other records unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sales");
const cell = sheet.getRange("B2");
cell.setValue(cell.getValue() + 10);
console.log(cell.getValue());
}Mail merge
Mapping structured records into individual message content and recipients.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Draft approval
A human review of a specific recipient and message version before delivery.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Drive iterator
A hasNext/next interface for traversing potentially multiple resources.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Sharing access
Who may reach a resource, distinct from what permission each user receives.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Two-dimensional array
An outer row array containing inner arrays of cells.
getValues returns a two-dimensional array: an outer array of rows and an inner array of cells. values[1][0] means the first cell of the second row. Headers occupy index zero if the range includes them. Ensure rows have the expected shape before reading columns, and name column indexes to avoid unexplained numeric offsets.
The outer index chooses the row before the inner index chooses its column.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const rows = [["Name", "Amount"], ["Alex", 120], ["Jordan", 80]];
console.log(rows[1][0]);
console.log(rows[2][1]);
}Batch write
One rectangular setValues operation instead of many separate cell writes.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Used range
The rectangle returned by getDataRange, which can include headers and unexpected cells.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Data validation rule
A constraint attached to cells; server automation still needs input validation.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Formula source
The expression beginning with =, distinct from its calculated value.
getValue reads the top-left cell; getValues reads the whole selected rectangle as nested arrays. Neither mutates cells. A displayed value and its underlying type can differ. Test values with typeof before arithmetic, and use getFormula when teaching formula source separately from its calculated result.
B2 contains a number; A2 contains the customer’s text name.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sales");
const value = sheet.getRange("B2").getValue();
console.log(value);
console.log(typeof value);
}Custom spreadsheet function
A deterministic returned calculation callable from a sheet formula under restrictions.
A custom function returns a value to a sheet formula rather than writing arbitrary cells. Keep it deterministic and avoid authorization-requiring services. A two-dimensional array return can spill into available neighboring cells. Test the pure function independently before entering it as a formula. The local function call is JavaScript, not a full Sheets formula evaluator.
The function returns 80, and its validation prevents rates outside zero through one.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
console.log(DISCOUNT(100, 0.2));
}
function DISCOUNT(price, rate) {
if (typeof price !== "number" || rate < 0 || rate > 1) throw new Error("Invalid price or rate");
return price * (1 - rate);
}Service call budget
A configurable local counter for experiments, not a fixed Google quota.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Quota exhaustion
A service usage limit preventing further work; current limits vary by account and method.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Authored fixture
Prepared deterministic example data clearly distinguished from a live service response.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Simulation adapter
A local implementation of selected service methods operating on fictional state.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Unsupported method
An API operation outside the local adapter contract that must fail visibly.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Manifest
The appsscript.json project configuration file controlling runtime and optional scopes or deployment metadata.
A file organizer should be repeatable and explicit about which resources it touches. Retrieve or create a destination, enumerate source files, filter candidates and move each intended file. This exercise copies into a new project folder to preserve inputs. In a real batch save a manifest of source and output IDs and test duplicate-name behavior.
The folder is reused if present. The source is copied, so repeated execution can still create duplicate copies to investigate.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const matches = DriveApp.getFoldersByName("Project Alpha");
const folder = matches.hasNext() ? matches.next() : DriveApp.createFolder("Project Alpha");
DriveApp.getFileById("brief").makeCopy("Project brief", folder);
console.log(folder.getName());
}V8 runtime
Apps Script’s JavaScript runtime; it does not provide a browser document DOM.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Execution log
Diagnostic output from a run; it is evidence of messages rather than proof of all effects.
Authorization is permission granted for a script to use services on someone’s behalf. Console messages do not grant access. A successful log is not proof that every external side effect succeeded. Inspect state and exceptions as well. The simulation never requests Google authorization. In a real project inspect the requested scopes, the account and the code before approving access; organization administrators can restrict services.
The normal sequence reaches Finished. An exception interrupts subsequent statements; it is not a Google authorization dialog.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
console.log("Starting");
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
console.log(sheet.getName());
console.log("Finished");
}Operation timeline
An ordered recording of actual local service calls, not a universal paused debugger.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Preview sandbox
An isolated iframe for client behavior with no parent-origin storage access.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Deployment audience
The set of users permitted to open a published application.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Restricted test deployment
A release limited to intended testers while identity and data exposure are checked.
Deployment settings determine who may open a web app and whose authority it uses. A working local preview does not validate real Google identity rules. Start with a restricted test deployment and a sample workbook. Review scopes, server validation, ownership and data exposure before expanding access. The exercise produces a concrete deployment checklist as data.
The checklist fails closed when identity review is missing; it is not a real deployment API.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const policy = {audience: "testers", identityReviewed: true, inputValidation: true, sampleDataOnly: true};
if (!policy.identityReviewed || !policy.inputValidation) throw new Error("Deployment review incomplete");
console.log(JSON.stringify(policy));
}Gemini API
A model service called separately from the Apps Script editor’s Gemini side panel.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Model configuration
A reviewed endpoint and currently available model selected for an actual account.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Structured AI output
Model-proposed data checked against an application schema before use.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Human review gate
A specific approval step before applying or distributing a proposed result.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Source verification
Checking a derived statement against its actual input evidence.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Prompt injection
Untrusted content attempting to override the application’s instructions or authority.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Vibe Learning
Discover, predict, understand, experiment, build, test, explain, reflect and extend.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Vibe Teaching
Teaching through an observable problem, guided experiment and evidence-based explanation.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Disciplined Vibe Coding
Using AI assistance while checking requirements, source, tests and deployment assumptions.
A script is a sequence of instructions. Apps Script runs JavaScript on Google servers and exposes service objects such as SpreadsheetApp. Here the same method names operate only on fictional local data. The function groups instructions under a name; defining it does not execute it. Run Script calls the selected function. The returned Spreadsheet contains a Sheet, and its getRange method identifies a cell. A1 notation combines a column letter and a one-based row number. B2 is the first person’s status, not their name.
getRange returns a Range object; setValue changes the selected cell. The name column stays unchanged.
A local demonstration does not grant real Google permissions or establish correctness outside its stated test cases.
function main() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
sheet.getRange("B2").setValue("Complete");
}Programming
Writing instructions that a computer can execute.
Writing instructions that a computer can execute. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
console.log("Hello");Program
A collection of instructions intended to accomplish a task.
A collection of instructions intended to accomplish a task. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
console.log(2 + 3);
Source code
The human-readable text of a program.
The human-readable text of a program. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
let score = 1;
Instruction
An operation described by source code.
An operation described by source code. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
console.log("Run");Statement
A complete syntactic unit such as a declaration or expression statement.
A complete syntactic unit such as a declaration or expression statement. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
let total = 5;
Expression
Source that evaluates to a value.
Source that evaluates to a value. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
5 * 3
Value
A piece of data that a program can use.
A piece of data that a program can use. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
42
Syntax
The grammatical rules for valid source code.
The grammatical rules for valid source code. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
console.log("Hello");Comment
Source text ignored during execution and intended for readers.
Source text ignored during execution and intended for readers. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
// Explain the rule.
Identifier
A name used to refer to a binding or other program entity.
A name used to refer to a binding or other program entity. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
itemsInCart
Keyword
A word reserved for a language construct.
A word reserved for a language construct. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
const
Semicolon
A statement separator or terminator in source syntax.
A statement separator or terminator in source syntax. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
let x = 1;
Parentheses
Symbols used for grouping or call argument lists.
Symbols used for grouping or call argument lists. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
(5 + 2) * 3
Brace
A symbol used to delimit blocks or object literals.
A symbol used to delimit blocks or object literals. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
if (true) { console.log("yes"); }Bracket
A symbol used in array literals or property access.
A symbol used in array literals or property access. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
items[0]
Literal
Source syntax directly representing a value.
Source syntax directly representing a value. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
"Hello"
Console
A diagnostic interface where programs record messages.
A diagnostic interface where programs record messages. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
console.log("Ready");Output
An observable result produced by execution.
An observable result produced by execution. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
console.log(15);
Input
Data supplied to a program or function.
Data supplied to a program or function. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
greet("Alex")Algorithm
A defined sequence of steps for solving a problem.
A defined sequence of steps for solving a problem. The example shows its use in JavaScript source.
Precise vocabulary helps you follow instructions and locate mistakes.
A term names a particular concept, not proof that a program is correct.
Read numbers, add them, display the sum.
Variable
A named binding used to access a value.
A named binding used to access a value. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
let score = 3;
Binding
The association between a name and a value.
The association between a name and a value. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
const title = "Course";
Declaration
Syntax that introduces a binding.
Syntax that introduces a binding. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
let count;
Assignment
An operation that stores a value in an existing binding.
An operation that stores a value in an existing binding. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
count = 2;
Reassignment
Replacing the value associated with a binding.
Replacing the value associated with a binding. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
count = 3;
let
A block-scoped declaration that allows reassignment.
A block-scoped declaration that allows reassignment. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
let count = 0;
const
A block-scoped declaration that prevents reassignment of its binding.
A block-scoped declaration that prevents reassignment of its binding. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
const rate = 0.1;
var
An older function-scoped declaration with hoisting behavior.
An older function-scoped declaration with hoisting behavior. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
var legacy = 1;
Data type
A category describing what a value is and which operations apply.
A category describing what a value is and which operations apply. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
typeof 5
String
A primitive sequence of UTF-16 code units representing text.
A primitive sequence of UTF-16 code units representing text. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
"JavaScript"
Number
The standard numeric type using floating-point representation.
The standard numeric type using floating-point representation. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
3.5
Boolean
A primitive logical value, either true or false.
A primitive logical value, either true or false. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
true
null
An explicit primitive value often representing intentional absence.
An explicit primitive value often representing intentional absence. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
const selected = null;
undefined
A primitive often observed when a value was not supplied or returned.
A primitive often observed when a value was not supplied or returned. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
let pending;
NaN
A numeric value representing an invalid numeric result.
A numeric value representing an invalid numeric result. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
Number("not a number")Infinity
A numeric value beyond finite magnitude.
A numeric value beyond finite magnitude. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
1 / 0
BigInt
An integer numeric type for arbitrarily large whole values.
An integer numeric type for arbitrarily large whole values. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
123n
Symbol
A primitive value with unique identity, often used as a property key.
A primitive value with unique identity, often used as a property key. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
Symbol("id")Primitive
A non-object value such as a string, number or Boolean.
A non-object value such as a string, number or Boolean. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
typeof "text"
Type conversion
Creating a representation of a value in another type.
Creating a representation of a value in another type. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
Number("12")Coercion
Conversion performed implicitly by a language operation.
Conversion performed implicitly by a language operation. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
"5" + 2
Truthy
A value that becomes true in Boolean context.
A value that becomes true in Boolean context. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
Boolean("hello")Falsy
A value that becomes false in Boolean context.
A value that becomes false in Boolean context. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
Boolean("")Immutability
The property of a value that cannot be changed in place.
The property of a value that cannot be changed in place. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
"text".toUpperCase()
Mutation
Changing the contents of an existing object or array.
Changing the contents of an existing object or array. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
items.push("new");State
The current values relevant to an application.
The current values relevant to an application. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
let count = 0;
Reference
An identity-bearing relationship to an object value.
An identity-bearing relationship to an object value. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
const other = original;
Shallow copy
A new outer object that still shares nested referenced values.
A new outer object that still shares nested referenced values. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
const copy = {...original};Deep copy
A copy that recreates supported nested data rather than sharing it.
A copy that recreates supported nested data rather than sharing it. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
structuredClone(record)
Serialization
Converting a supported value into a transport representation.
Converting a supported value into a transport representation. The example shows its use in JavaScript source.
Bindings and types determine how calculations and state updates behave.
The type belongs to the value; const does not deeply freeze an object.
JSON.stringify(record)
Condition
An expression used to select a control-flow branch.
An expression used to select a control-flow branch. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
score >= 5
Branch
One possible path chosen by control flow.
One possible path chosen by control flow. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
if (ready) { run(); }Loop
A construct that repeats operations while its rule allows it.
A construct that repeats operations while its rule allows it. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
for (let i = 0; i < 3; i++) {}Iteration
One pass through a loop body.
One pass through a loop body. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
console.log(i);
Accumulator
A value carrying a running result across iterations.
A value carrying a running result across iterations. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
sum += value;
Counter
A binding that tracks a changing count or position.
A binding that tracks a changing count or position. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
i++
Infinite loop
Repetition whose stopping condition is never reached.
Repetition whose stopping condition is never reached. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
while (true) {}Function
A callable unit of reusable behavior.
A callable unit of reusable behavior. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
function double(n) { return n * 2; }Parameter
A binding declared to receive a function argument.
A binding declared to receive a function argument. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
function greet(name) {}Argument
A value supplied in a call.
A value supplied in a call. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
greet("Alex")Return value
The result given by a function to its caller.
The result given by a function to its caller. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
return total;
Callback
A function supplied to another operation for later or repeated invocation.
A function supplied to another operation for later or repeated invocation. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
items.map(double)
Arrow function
A function expression using arrow syntax and lexical this.
A function expression using arrow syntax and lexical this. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
n => n * 2
Scope
The region in which a binding can be accessed.
The region in which a binding can be accessed. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
{ let local = 1; }Block scope
Visibility limited to the enclosing block.
Visibility limited to the enclosing block. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
if (true) { let x = 1; }Global scope
The outer scope for a script environment.
The outer scope for a script environment. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
globalThis
Local scope
A scope belonging to an inner function or block.
A scope belonging to an inner function or block. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
function f() { const local = 1; }Closure
A function retaining access to bindings from its creation environment.
A function retaining access to bindings from its creation environment. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
function make(n) { return () => n; }Call stack
The active sequence of function calls waiting to finish.
The active sequence of function calls waiting to finish. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
outer() calls inner()
Stack frame
The execution context of a particular active function call.
The execution context of a particular active function call. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
double(4)
Recursion
A function invoking itself with a defined stopping case.
A function invoking itself with a defined stopping case. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
factorial(n - 1)
Base case
A condition that stops a recursive calculation.
A condition that stops a recursive calculation. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
if (n === 0) return 1;
Pure function
A function whose result depends on arguments and does not mutate external state.
A function whose result depends on arguments and does not mutate external state. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
n => n * 2
Side effect
An observable change outside a function’s returned value.
An observable change outside a function’s returned value. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
element.textContent = "Updated";
Hoisting
The observable early establishment of certain declarations in a scope.
The observable early establishment of certain declarations in a scope. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
function declarations can be called before their source position
Temporal dead zone
The region before a lexical binding is initialized where access throws.
The region before a lexical binding is initialized where access throws. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
console.log(x); let x = 1;
Destructuring
Syntax extracting values from arrays or object properties.
Syntax extracting values from arrays or object properties. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
const {name} = person;Spread syntax
Syntax expanding iterable elements or copying object properties.
Syntax expanding iterable elements or copying object properties. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
[...items]
Rest parameter
A parameter collecting remaining arguments into an array.
A parameter collecting remaining arguments into an array. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
function sum(...values) {}Default parameter
An initializer used when an argument is undefined.
An initializer used when an argument is undefined. The example shows its use in JavaScript source.
Control flow and functions express decisions and reusable rules.
A definition is not a call; returned values and console messages have different roles.
function greet(name = "friend") {}Array
An ordered, indexed object commonly used as a collection.
An ordered, indexed object commonly used as a collection. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
["Learn", "Build"]
Index
A numeric position used to access an array element.
A numeric position used to access an array element. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
items[0]
Element
A value stored at an array position.
A value stored at an array position. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
items[1]
Length
The array boundary or string code-unit count reported by length.
The array boundary or string code-unit count reported by length. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
items.length
Object
A value that groups named properties and has identity.
A value that groups named properties and has identity. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
{name: "Alex"}Property
A key-value association on an object.
A key-value association on an object. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
person.name
Key
A string or symbol identifying an object property.
A string or symbol identifying an object property. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
"name"
Method
A callable property associated with an object.
A callable property associated with an object. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
text.trim()
Prototype
An object consulted during inherited property lookup.
An object consulted during inherited property lookup. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
Object.getPrototypeOf(record)
Class
Syntax for defining construction and prototype-based behavior.
Syntax for defining construction and prototype-based behavior. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
class Counter {}Instance
An object created with a particular constructor.
An object created with a particular constructor. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
new Counter()
Constructor
A function used to initialize an object through new.
A function used to initialize an object through new. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
constructor(name) { this.name = name; }this
A binding whose value depends on the call form, except lexical arrows.
A binding whose value depends on the call form, except lexical arrows. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
this.name
Getter
An accessor invoked when a property is read.
An accessor invoked when a property is read. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
get total() { return this.price * this.qty; }Setter
An accessor invoked when a property is assigned.
An accessor invoked when a property is assigned. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
set value(n) { this._value = n; }Static method
A method available on the class constructor rather than instances.
A method available on the class constructor rather than instances. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
Math.abs(-2)
Map collection
A keyed collection supporting arbitrary value keys.
A keyed collection supporting arbitrary value keys. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
new Map()
Set collection
A collection of unique values.
A collection of unique values. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
new Set([1,1,2])
Iterable
A value providing an iterator used by constructs such as for...of.
A value providing an iterator used by constructs such as for...of. The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
for (const item of items) {}Iterator
An object producing successive values with next().
An object producing successive values with next(). The example shows its use in JavaScript source.
Collections let a program work with many values while preserving their identities.
An array is an object; copying its binding does not copy its contents.
items.values()
HTML
The markup language describing webpage structure and content.
The markup language describing webpage structure and content. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
<button>Run</button>
CSS
The styling language describing webpage presentation.
The styling language describing webpage presentation. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
button { color: green; }DOM
The document tree exposed as objects to browser JavaScript.
The document tree exposed as objects to browser JavaScript. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
document.body
Node
An object participating in a document tree.
An object participating in a document tree. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
element.firstChild
Element node
A node representing an HTML or SVG element.
A node representing an HTML or SVG element. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
document.createElement("p")Text node
A node containing literal document text.
A node containing literal document text. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
document.createTextNode("Hello")Attribute
A named markup setting associated with an element.
A named markup setting associated with an element. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
id="result"
Selector
A pattern used to locate matching elements.
A pattern used to locate matching elements. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
#result
Event
An occurrence dispatched to an event target.
An occurrence dispatched to an event target. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
click
Event listener
A registered callback invoked for a specified event.
A registered callback invoked for a specified event. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
button.addEventListener("click", handler)Event target
The node where an event originated.
The node where an event originated. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
event.target
Current target
The object whose listener is currently running.
The object whose listener is currently running. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
event.currentTarget
Bubbling
Propagation of an event through ancestor targets after its target phase.
Propagation of an event through ancestor targets after its target phase. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
A button click reaches its parent listener.
Capture phase
The propagation phase traveling toward the target before bubbling.
The propagation phase traveling toward the target before bubbling. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
addEventListener("click", handler, true)Delegation
Handling child actions using an ancestor listener.
Handling child actions using an ancestor listener. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
list.addEventListener("click", handler)Default action
A browser behavior associated with an event, such as form navigation.
A browser behavior associated with an event, such as form navigation. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
event.preventDefault()
Form validation
Checking whether submitted field values satisfy constraints.
Checking whether submitted field values satisfy constraints. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
input.checkValidity()
Accessibility
Designing functionality usable by people with varied access needs.
Designing functionality usable by people with varied access needs. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
Use a labeled native button.
Accessible name
The label exposed for an interactive element to accessibility APIs.
The label exposed for an interactive element to accessibility APIs. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
aria-label="Increase count"
Focus
The current keyboard interaction target.
The current keyboard interaction target. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
input.focus()
Live region
An area whose updates can be announced by assistive technology.
An area whose updates can be announced by assistive technology. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
role="status"
Rendering
Producing visible interface content from current state.
Producing visible interface content from current state. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
render(records)
Component
A bounded reusable unit of interface structure and behavior.
A bounded reusable unit of interface structure and behavior. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
createCounter(container)
Persistence
Retaining data across a page or application session.
Retaining data across a page or application session. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
localStorage.setItem(key, text)
Origin
The scheme, host and port used to isolate browser resources.
The scheme, host and port used to isolate browser resources. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
https://example.test:443
Sandbox
A restricted environment limiting the capabilities of executed content.
A restricted environment limiting the capabilities of executed content. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
<iframe sandbox="allow-scripts">
Web Worker
A separate execution context suited to non-DOM JavaScript work.
A separate execution context suited to non-DOM JavaScript work. The example shows its use in JavaScript source.
Browser vocabulary connects program data to real accessible user interfaces.
A DOM element is an object; inserting untrusted HTML is different from inserting text.
new Worker(url)