Skip to content

Latest commit

 

History

History
86 lines (53 loc) · 2.62 KB

environment.org

File metadata and controls

86 lines (53 loc) · 2.62 KB

Environment Setup

This document outlines what tools we’ll be using during the class to complete exercises. It is recommended that you at least read the Prerequisites section below before the start of class.

Prerequisites

Download Google Chrome

All demos and lecture content will be conducted from within Google Chrome: it is recommended that you download and install Chrome prior to class.

All examples will be conducted from within Chrome – this is important because each browser’s console is different in:

  • Appearance
  • Function
  • Keystrokes to open

If you are using Chrome, the demos and help that we give will be more relevant and familiar.

Learn to Open the Console

./img/open-console.png

It is recommended that you memorize how to open a console with the appropriate keyboard shortcut. We’ll open and close the console frequently.

Working with the Console

The console is a development tool that is used to quickly evaluate JavaScript code and debug programs (at least this is how we will be using it – there are other uses too!). A console can be opened in all web pages. Each browser has its own console, and they all behave slightly differently. You can read more about Chrome’s console here.

Entering Code

Code can be entered directly into the console:

./img/entering-code-console.gif

Cycling History

You can use the up/down arrow keys on your keyboard to cycle through the console’s history:

./img/console-history.gif

Expansion (Objects & Arrays)

(NOTE: Objects and arrays will be covered in lecture – if you don’t know what these are, don’t worry about this yet)

Arrays and objects can be expanded and viewed:

./img/expanding-data-console.gif

Working in Codepen

Codepen is an online tool that can be used to write JavaScript, HTML and CSS right from inside of your browser. No files, text editors or knowledge of how to set up a working development environment is required. We’ll be using Codepen for all of our exercises and the project. You can read more about Codepen here.

Layout

The default layout isn’t great, but it can be changed!

./img/codepen-layout.gif

Console

Fortunately, functions and variables defined in codepen can be accessed from the console.

./img/codepen-console.gif

Errors

Errors happen. Codepen will show a little red exclamation point in the lower right that can be clicked to help troubleshoot the error.

./img/codepen-errors.gif