For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Arrays

空の配列を作成するのは簡単です:

const foo:string[] = [];

あるコンテンツで事前に埋められた配列を作成するには、ES6Array.prototype.fillを使います:

const foo:string[] = new Array(3).fill('');
console.log(foo); // ['','',''];

最終更新