Xcode playground not executing functions
Because you didn't call the function. Just call it:
func hello()
{
print("Hello, World")
}
hello()
Also, If you are calling the method before its implementation, the Swift Playground wouldn't allow you to do that, and errors out as below
Use of unresolved identifier 'hello'
WRONG ORDER:
hello()
func hello()
{
print("Hello, World")
}
RIGHT ORDER
func hello()
{
print("Hello, World")
}
hello()