Sobes.tech
Junior — Senior

Differences in typing of two functions

livecode

Task condition

Question: Is there a difference in declaring parameter types in the following functions?

const firstFn = (input?: string) => {
  console.log(input);
}

const secondFn = (input: string | undefined) => {
  console.log(input);
}