Skip to content

Latest commit

 

History

History
70 lines (45 loc) · 4.13 KB

setup.md

File metadata and controls

70 lines (45 loc) · 4.13 KB

Set Up

Before working on the exercises in this repo you will need access to a text editor where you can write and run JavaScript, and so we will currently turn our attention to defining what a text editor is, and introducing an excellent and easy to use online text editor.

Objectives

By the time you complete this section you should be able to:

  • Describe what a text editor is
  • Use the online text editor repl.it

Using Text Editors to Write Code

Most likely you are very familiar working with programs like email clients, and word processors where you are able to style your text with things like italics or bolding or for it to be a different font. When we wish to write code, be it in JavaScript, HTML, or any other programming language, we must use plain text only. Plain text is text that cannot be styled. It is characters and nothing else.

A Text Editor is a program that allows us to write in plain text so that we can write code that a computer will be able to understand. Text editors also provide a wealth of features to support programmers in writing code such as keyboard shortcuts, syntax highlighting, file system access, an much much more.

Aside from our thinking, and computers to run our code, text editors are the single most important tool for programmers.

Repl.it

Text editors tend to be programs that you install on your computer, however, there are also text editors running as web applications online. Using online text editors can be very handy when there is not time to set up and install a text editor program on your computer, or, when wishing to share code easily with others.

You will be able to work on any and all of the code in this repository by using the excellent online text editor repl.it, which provides syntax highlighting, access to 3rd party libraries, and a console which we will use extensively to inspect our code. We will be using repl.it to write and run JavaScript, but as an aside, it can also be used to run and write code in almost all modern programming languages.

image

If you already have a text editor installed, and know how to run your code in a console, please feel free to use it. Otherwise please use repl.it to write and run JavaScript code while working through this repository. repl.it requires sign up, but is free, and you can even sign up using an already existing Google, GitHub, or Facebook account.

⭐ Copy and paste the following block of code into repl.it and then run it. You should see a message indicating success in the console which is on the right hand side of the page.

let message = 'It looks like this is working';
printMessage(message);

function printMessage(message) {
  console.log(message);
}

image

⭐ Hover over the run button and notice that you are shown a keyboard shortcut for running the code. Run the code again, this time using the keyboard shortcut.

Table of Contents

Basic Training Materials

Advanced Content

Appendix