Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.15 KB

README.md

File metadata and controls

40 lines (30 loc) · 1.15 KB

typescript-workshop

Day 1:

Exercise 1: Alert Hello World!

Try me

const message = 'Hello World!';
console.log(message);

Exercise 2: Fix the errors

Try me

const num1: number = '3';
num1 = num1 + 7; // 10
console.log(num1);

// Do not change the type of the assignment value
let employeeId: string = 'MF1001';
employeeId = 1001;
console.log(employeeId);

let employee: {
    name: string,
    id: number 
};
employee = {
    name: 123,
    id: xyz
};

// Create a employee object type array and push employee data to the array
// let employeeList = .................