else if condition in typescript code example
Example: typescript if else
let let x: number = 10, y = 20;
if (x > y)
{
console.log('x is greater than y.');
}
else
{
console.log('x is less than or equal to y.'); //This will be executed
}
let let x: number = 10, y = 20;
if (x > y)
{
console.log('x is greater than y.');
}
else
{
console.log('x is less than or equal to y.'); //This will be executed
}