TypeScript
Lesson 1 of 8
13%
Free Section Starter (Lesson 1)
TYPESCRIPT Free Section Starter Challenge 15 min

1. Primitive Types, Type Annotations & Arrays

Overview: Declare types for numbers, strings, booleans, and typed arrays `string[]`.

Concept & Syntax Guide

TypeScript adds syntax on top of JavaScript. By writing `let price: number = 1499;`, the compiler ensures you never accidentally assign a string to it.

Hands-On Practice Exercise

Type an Array of Product Names

Declare a typed array `const templates: string[]` containing "FitPulse" and "EduNova". Print the joined string.

Target Output: Templates: FitPulse, EduNova
Need a hint? Click here to reveal
Hint: Check syntax carefully and make sure your code contains: Templates: FitPulse, EduNova
TYPESCRIPT Code Editor
1
2
3
4
5
6
7
8
9
10