Pantrypoints Pantrypoints

Array Data Kind

August 22, 2023 1 minutes  • 61 words
Table of contents

The array kind is a list of data.

Let skills: string[] = [];

Let stuff: (string|number)[];

stuff = [1, 2, 'bag']

Adding items through array position:

skills[0] = "Eating";
skills[1] = "Sleeping";

Methods

Adding items through push():

skills.push('Eating, Sleeping');
array.length
typeof(array)

forEach()

map()

reduce()

filter()

Tuple

A tuple is a fixed array.

let color: [number, number, number?] // ? is optional
Follow Us! →

We're creating a new Economic System from a new Economic Science! Please support us by leaving your email or leaving a comment above.