Open this example in the interactive library
Source code
import * as util from "node:util";
console.log(util.inspect({ z: 1, a: 2 }, { sorted: true }));
Sample output
{ a: 2, z: 1 }
Open this example in the interactive library
import * as util from "node:util";
console.log(util.inspect({ z: 1, a: 2 }, { sorted: true }));
{ a: 2, z: 1 }