Skip to content
Home Tutorials Roadmaps Courses
Log in Join free
Tutorials TypeScript What is TypeScript?
TypeScript Intermediate FREE

What is TypeScript?

Lesson 1 of 17 Intermediate Interactive

TypeScript is a strongly typed programming language that builds on JavaScript. It adds static type checking to help catch errors early.

TypeScript is developed by Microsoft and is widely used in large-scale applications.

Why TypeScript?

  • Catches errors at compile time
  • Better IDE support and autocompletion
  • Great for large codebases
  • Compiles to plain JavaScript

Syntax

TYPESCRIPT
let message: string = "Hello, TypeScript!";
let count: number = 42;
let isActive: boolean = true;

function greet(name: string): string {
    return `Hello, ${name}!`;
}
TypeScript Hello World
TYPESCRIPT
let message: string = "Hello, TypeScript!";
console.log(message);

let count: number = 42;
let isActive: boolean = true;

function greet(name: string): string {
    return `Hello, ${name}!`;
}

console.log(greet("SukhNexus"));

Practice

1
Exercise

What is the main benefit of TypeScript over JavaScript?

Answer
Static type checking — catches errors at compile time.

Quick Quiz

1

What does TypeScript compile to?

TypeScript compiles to plain JavaScript that runs in any browser.

Interview Questions

TypeScript adds static type checking and compiles to JavaScript. JavaScript is dynamically typed.