ASCI Logo
ASCI.Academy
LearnPracticeCompeteCareer
Sign InGet Started

Search ASCI Academy

Universal search across Courses, Lessons, Skills, Projects, Challenges, Competitions, Jobs, Internships, and Users

typescript

Curriculum Index

Current LevelInitiate
0/ 500 XP
Gravit Certificate:
100% Required
  • TypeScript Introduction & Static Typing
  • Arrays, Tuples & Function Signatures
•
1
2
3
4
5
6
7
8
9
10
Introduction & Basic Types•Lesson 2

Arrays, Tuples & Function Signatures

Arrays in TypeScript can be typed as number[] or string[]. Tuples take this further by specifying exact fixed lengths and distinct types for each index position, perfect for coordinates [x, y] or key-value pairs.

> **Key Takeaway:** Define typed collections with Array and fixed-length, heterogeneously typed sequences with Tuples.
Python 3.11
•
Interactive Challenge
+50 XP
Challenge Objective

Define typed collections with Array<T> and fixed-length, heterogeneously typed sequences with Tuples.

solution.py
UTF-84 SpacesAuto-saved
cpython3.11:~/workspace
CPython 3.11.8 (WASM)
$python3 -u solution.py
Click "Compile & Run" (or press Ctrl + Enter) to compile AST, verify bytecode, and execute the solution.