Basics

Challenges

Classes

Cookies

Debugging

Events

External Files

Flow Control

Forms

Functions

Html Elements

Installation

Interfaces

Keywords

Modules

Namespaces

Operators

Reference Files

String

Types

TypeScript - If

if statement


if (condition1)
{
    //block of code to be executed if condition1 is true
}

else if (condition2)
{
    //block of code to be executed if the condition1 is false and condition2 is true
}

else
{
    //block of code to be executed if the condition1 is false and condition2 is false
}