MDN self-hosted library · e01.org
Trailing commas / notebook

Trailing commas

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
const arr = [1, 2, 3, , ,];
arr.length; // 5
js
const object = {
  foo: "bar",
  baz: "qwerty",
  age: 42,
};