Why am i getting "use of unresolved identifier 'x'" in swift?

Example:

print(x)
The error means you are trying to use a variable or function that hasn't been declared in the current scope.

Solution:

let x = "Hello"
print(x)

Beginner's Guide to Swift