Concepts

Diagnostic value snapshot

Try the free JavaScript compiler

Capture a deliberate JSON snapshot of known JSON-compatible data before later mutations.

Formal Syntax & Structure

javascript syntaxjavascript
console.log(label, JSON.stringify(record))

Working Example

Example Snippetjavascript
(async () => {const record={qty:2}; const snapshot=JSON.stringify(record); record.qty=7; console.log(snapshot,record.qty);})()
JavaScript Reference