Comment

Comment by jnspts

It's not an array, but a way of using a variable as a key in an object.

const name = "key"

const example = { [name]: "value" };

This would result in

const example = { key: "value" };

parent jnspts 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton