Variable not printing in X code Version 9.2

  1. 12 months ago
    Edited 12 months ago by Jerry-K27

    Hi

    Greeting
    I'm a new guy to swift. Can anyone tell me what is going on with my code? The (print) function did not print what I have assigned in the variable. Check out image below;

    var str = ("Hello World")
    print("str")

    -image-

    The console suppose to show "hello world" instead of "str\n" right?

    Thank you.

    Regards
    Jerry Tan

or Sign Up to reply!