---
title: "An array's methods, a TypeShade shader example"
description: "An array's methods, a TypeShade example. Three lights in an array<Light, 3>, shaded with the array methods TypeScript developers commonly use."
url: https://typeshade.dev/guide/examples/array-methods/
language: en
---

# An array's methods

Three lights in an `array<Light, 3>`, shaded with the array methods TypeScript developers commonly use.

**array-methods.shade.ts**

`TS`

Diagnostics Ready to compile

Loading the program…

Compile a module with a vertex entry and a fragment entry to see it drawn.

The editor holds this example's own file, and the program is that file and any file it imports. An edit recompiles it in your browser, and the tabs beside the editor follow.

[File on GitHub](https://github.com/typeshade/typeshade/blob/af54ddad5/examples/gallery/array-methods/array-methods.shade.ts)
