Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMike Cho
570 PointsWhat is a console?
Dear Amit,
You mentioned the word console in this video, but I couldn't grasp the concept of what a 'console' actually is. I would be grateful if you could elaborate on that term a little bit more.
Thank you!
Kindly, Mike
3 Answers
James Anwyl
Full Stack JavaScript Techdegree Graduate 49,960 PointsIt's kinda hard to explain but I'll try. The definition of a system console from wikipedia:
"The system console, computer console, root console, operator's console, or simply console is the text entry and display device for system administration messages, particularly those from the BIOS or boot loader, the kernel, from the init system and from the system logger."
An example of a console (also known as a terminal) that you've probably seen before would be cmd in windows
You can issue commands in the console, for (a very basic) example I could create a new folder using the following command:
mkdir foldername
Its basically just a way to issue commands that interacts directly with an operating system or piece of software.
The console that you'll be using while learning Swift is a bit different to the windows console above, but the principal is the same.
Hope that helps!
Luke Glazebrook
13,564 PointsHi Mike!
The console is the area in which you can see text-based output from your program. That is all you will really need to know at this point to get yourself up and running with Swift!
println("This text will print to the console.")
Mike Cho
570 PointsThis was very helpful. Thank you!
Luke Glazebrook
13,564 PointsNo problem Mike!
There is a lot more to the console than what I have told you here but for your current use you won't need to know any more about it. Once you have finished the Swift Basics stage of the track you will find yourself barely ever using it.
-Luke
Mike Cho
570 PointsGot it! Awesome community here. Cheers!
Gloria Dwomoh
13,116 PointsHi Mike. I will give you my explanation of it. In that video the console is in the right area and the editor is on the left. The console is the area (user interface) on the right side of the screen, that displays the output of the commands given from the left side of the the screen (editor). You write the code (things like the functions print/println that send what they return to the output stream) and the results(output) of what you have written displays in the console on the right. If you check the workspaces you'd also see a console there. Basically a console displays the output of a written code (but some can also get input from a user). In general a good amount of consoles can also get input; for example when you ask the user to give you a number or their name, the user types the input on a console. The one you see on the right side though just displays the output of your code so it does not take input. I hope this helps.
Mike Cho
570 PointsAhh...interesting. Thank you very much for this practical approach to my question. Made me understand what I was looking at. Haha =)
Gloria Dwomoh
13,116 PointsYou are welcome.
Mike Cho
570 PointsMike Cho
570 PointsThank you very much for your fast reply. I do understand the concept of a console better now. Thank you!