To print something in Swift, you can use the print()
function. For example:
main.swift23 chars2 lines
This will print the string "Hello, world!" to the console. You can also print variables by including them in the parentheses:
main.swift68 chars4 lines
This will print "Name: Alice, Age: 30" to the console.
gistlibby LogSnag