scrimba
Understanding Typescript In Depth
Typescript Section-1 Types with Let & const #05
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Typescript Section-1 Types with Let & const #05
AboutCommentsNotes
Typescript Section-1 Types with Let & const #05
Expand for more info
index.ts
run
preview
console
function switchFunction(num: number) {
let b: string = "functionb";

switch (num) {
case 1: {
let b: string = "case 1";
break;
} // After break
case 2:
{
let b: string = "case 2";
} // Before break
break;
}
}

const arr: number[] = [1, 2, 3];
arr.push(4);
// arr.push('4');
Console
index.html
-4:30