- Open Google Chrome
- Open any webpage
- Press Command + Option + J (Mac) to Open the the Chrome DevTools console - Other ways to open Chrome DevTools
- Constants, strings and semicolons
const greeting = 'Hello';
- Variables and numbers
var amount = 4;
- Work through the Language basics crash course
- Where to find help
- Terminal and commands - iTerm2
- macOS package management - Homebrew
- JavaScript runtime - Node.js
- JavaScript package management - Node Pagage Manager (NPM), Yarn
- Code editor - Visual Studio Code
- Linting - ESLint
- Rapid prototyping playground - Quokka.js
MDN Web Docs (previously Mozilla Developer Network):
Download and install the following applications:
- Open iTerm
- Create a directory
mkdir learn-javascript
- choose your own directory name - Change to the created directory
cd learn-javascript
- use the directory name you chose - Create a Visual Studio Code workspace
- Brew install Yarn
brew install yarn
- if needed brew install Node.jsbrew install node
- Create a
package.json
fileyarn init
- Create an
index.js
filetouch index.js
- Install ESLint Visual Studio Code extension
- Create an ESLint config file
npx eslint --init
- Set the no console rule to
off
in the ESLint config'no-console': 'off',
First steps
More
- Objects and properties (literal notation)
const data = {};
- read more - Scope
- Error handling
try {} catch {}
To do more...
Typically when setting up a new project this would be the first step. To gently indroduce you to new concepts I've waited until day 3 to introduce this.
- Version control and source repositories - Git
- Code sharing, issue tracking - GitHub, GitLab, BitBucket
- Create a GitLab account
- Generate an SSH key pair
- Add the public SSH key to your GitLab account
- Verify that you can connect
- Download and install GitHub Desktop
- Install GitLens Visual Studio Code extension
- Initialise a local Git repository
git init
- if needed install Git - Create a remote Git repository on GitLab
- Add the remote repository to our project
git remote add origin https://github.com/mattvick/learn-javascript.git
- Add a
.gitignore
file to tell Git to ignore certain filesecho "/node_modules" >> .gitignore
- Add a read me file
echo "# Learn JavaScript" >> README.md
- Add all changes in the working directory to Git's staging area
git add .
- Commit changes to Git with a message
git commit -m "Initial commit"
- Push changes to GitLab
git push -u origin master
- Viewing file diffs (changes)
- Commit and push changes
- Pulling changes
- Fetching vs pulling
- Merging via merge requests
To do more..
To do more..
To do more..
To do more..
To do more..