Giter Site home page Giter Site logo

m2-2-js--fundamentals-p1's Introduction

JavaScript Fundamentals - Part 2

Setup

In order to easily evaluate your answers, you will need a node environment. We could use the browser, as I did during the lecture, but it would be easier to manage if there was a way to do this in VS Code. There is! ๐Ÿคฏ

You can toggle the terminal window in VS Code with the following keyboard shortcut:

  • [ctrl + j] on Windows
  • [cmd + j] on Mac

This will open an instance of the terminal.

There are 2 ways to evaluate your JS using Node:

Type JS directly into the Node Env.

  • Type node in the terminal, and hit enter.

This will turn that terminal into a Node environment for you to play with.

You can type JavaScript in the same way I did while using the Browser console.

Exit the Node Environment

To exit/quit Node and get back to the terminal, do [ctrl + c] twice.

Use Node to execute files

To run your exercise files, you will need to type the following command at the terminal prompt:

node <PATH TO FILE>

The easiest way to do this is to type node, hit [space] and then drag the file you want to evaluate into the terminal. This will place the path into the command line.

Alternatively, you can navigate to the right folder using cd and then you could type node <FILE_NAME>.

m2-2-js--fundamentals-p1's People

Contributors

joshwcomeau avatar scottanthonymorin avatar splashley avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.