Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Emerging JavaScript pattern: multiple return values. Parent comment
It will work just fine in TypeScript, where you can define a "fixed size" array as a type:
type Test = [number, string]; const test: Test = [1, 'something'];
There are no comments on this comment yet.
It will work just fine in TypeScript, where you can define a "fixed size" array as a type:
The second line will fail compilation if there's a different number of elements in that array, or if the types don't match.