#native_company# #native_desc#
#native_cta#

Setup Instructions

Let's get physical

Sometimes, nothing beats holding a copy of a book in your hands. Writing in the margins, highlighting sentences, folding corners. So this book is also available from Amazon as a paperback.

Buy now on Amazon

Throughout this course, I will be using Visual Studio Code to write and debug JavaScript code.

You don’t have to use Visual Studio Code (VS Code), but I recommend that you do just so that you will be able to follow what I am doing.

If you haven’t used Visual Studio Code before, it’s entirely Free Open Source editor from Microsoft. It comes with many different plugins that you can use to extend its behavior and make your life a little easier.

I will show you how to install and set up Visual Studio Code and then install a recommended plugin called Live Server.

We will be build several demo applications, the starting and completed code for those applications can be found on the code repository associated with this book.

Instructions

Download the sample code

The sample code for this book can be found on GitHub: https://github.com/codecraft-tv/tfjs

You can choose to either download directly from GitHub as a zip using this direct link: https://github.com/codecraft-tv/tfjs/archive/master.zip

Or if you are comfortable with GitHub and the command line git you can type:

git clone https://github.com/codecraft-tv/tfjs.git

This will create into your current folder a folder called tfjs and inside there you will find several folders like so:

.
├── emoji-trainer
├── image-classification
├── linear-regression
├── loss-regression
├── mnist
├── parcel-example
├── polynomial-regression
├── tensorflow-basics
└── tensorflow-optimization

Each of these folders is a sample project or some sample code you will need in order to complete this book.

Download and Install Visual Studio Code for your Operating System.

Visit https://code.visualstudio.com/ and follow the instructions for how to install VS code on your operating system.

Install the Live Server plugin.

Most of the code examples in this course will run in the browser, so we need a way to launch a local webserver to serve us an index.html file containing our code. There are quite a few ways of doing this, and if you are comfortable with another method, go right ahead and continue using it. I prefer using the Live Server plugin in VS Code.

Install Live Server Plugin
Figure 1. Install Live Server Plugin
  1. Open the Extensions panel.

  2. Search for Live Server in the search box.

  3. Click the Live Sever result.

  4. Press the install button to add this extension to VS Code.

Using the Live Server plugin.

Now we have it installed we can use the Live Server plugin in several ways, like so.

Mouse

Use the Live Server Plugin
Figure 2. Using the VS Code Live Server Plugin
  1. Right Click the HTML file you want to serve.

  2. Select the menu item “Open with Live Server”

This will launch a web server running in the root of your project on port 5000 and open your default browser, pointing to your HTML page.

Keyboard Shortcuts

You could also start and stop Live Server using the Visual Studio Command Pallette.

Type Ctrl+Shift+P on Windows or CMD+Shift+P on Mac.

This will bring up the command pallette, start typing “Live Server” and you will see the option “Live Server: Open With Live Server” appear, select that option.



Advanced JavaScript

This unique course teaches you advanced JavaScript knowledge through a series of interview questions. Bring your JavaScript to the 2021's today.

Level up your JavaScript now!