Dhananjay Patel Logo
  1. Home
  2. / Blog
  3. / Typescript Basic
  4. / Lessons
  5. / 4
index.ts
function addNumbers(a: number, b: number): number {
return a + b
}
console.log(addNumbers(3,5))
const fullName = (firstname: string, lastname: string = ""): string => {
return `${firstname} ${lastname}`
}
console.log(fullName('Dhananjay'))
console.log(fullName('Dhananjay', 'Patel'))