Instruction: Provide a detailed comparison of the 'unknown' and 'any' types, including examples where each is appropriate to use.
Context: This question explores the candidate's understanding of TypeScript's type safety mechanisms, particularly the distinction between 'unknown' and 'any' types.