Like javascript, in TypeScript also, the function is used to create some reusable block of code. That is if we need a block of code several times then we should define a function.
Like javascript, in TypeScript also, the function is used to create some reusable block of code. That is if we need a block of code several times then we should define a function.