[Typescript] Typescript VS JavaScript

Typescript VS JavaScript

handbook blog

Typescript = Supersets of JavaScript & JavaScript + types

TS

Types in Typescript

let studentID: number = 12345;
let studentNmae: string = 'Hi Kim';
let age: number = 21;
let gender:string = 'female';
let subject:string = 'javascript';
let courseCompleted: boolean = false;

function getStudentDatails(studentID: number):{
  studentID: number;
  studentNmae: string;
  age: number;
  gender: string;
  subject: string;
  createDate: Date;
}{
  return null;
}