Why do i see 'use of unresolved identifier' in swift?

This error occurs when you reference an identifier (like a variable or function name) that hasn't been defined or isn't available in the current scope.

Example:

  print(myUndefinedVar)
  
Solution:

  let myUndefinedVar = "Now it's defined"
  print(myUndefinedVar)
  

Beginner's Guide to Swift