Sample Video Frame
01: A First Program
The very first exercise simply has you printing things to the screen. We will use something called console.log. This may seem like a lot to type just to print something to your terminal, but remember that JavaScript comes from a history of the browser. In the browser there really is no input and output other than the HTML page. We are using JavaScript from the terminal, and Node simply uses the browser console to talk to the terminal.
The Code
The format of these exercises is very simple:
- You read the exercise and the code as best you can.
- You then attempt to type in the code yourself based on what you saw me do.
- If you run into trouble, you can email me at help@learncodethehardway.org or contact me on the chat channel. Just be sure to give yourself 1-2 days before you ask for help.
- Then you should try to break your code in different ways to see what happens.
- Finally you can attempt the study drills, but don't get stuck on them. They are intended more as additional studies and exercises for you to try, but if they are too difficult feel, free to record which ones you couldn't do and come back to them later.
Here's your code:
console.log("You are writing text to your screen.")
console.log("This is called 'standard output'.")
console.log("This stuff in the ( ) is a string.")
console.log("Start a string with a double-quote.")
console.log("Write what you want.")
console.log("Then end with a double-quote.")
Register for The Pro-Webdev Mega Bundle
Register today for the course and get the all currently available videos and lessons, plus all future modules for no extra charge.