Afsara
Afsara

Reputation: 1461

Unable to see console output in assistant editor using swift playground

Can any one explain me , why console output is not visible in assistant editor. the bar on the right is only showing "Hello, playground" and the assistant editor is showing blank.

// Playground - noun: a place where people can play

   import UIKit

   var str = "Hello, playground"

   println("Hello")

   NSLog("Hello, world")

Upvotes: 0

Views: 1474

Answers (1)

Kumar KL
Kumar KL

Reputation: 15335

You need to import the cocoa library :

import Cocoa

This Sample working fine for me:

import Cocoa

var str = "Hello, playground"
println("Hello")

NSLog("Hello, world")

Upvotes: 1

Related Questions