GithubHelp home page GithubHelp logo

car-node-module's Introduction

Homework: Modules

DO NOT ALTER THE TEST FILE. Continue coding in the Car.js file until all tests pass. index.js not included.

  • Make a module (Car.js) that defines a Car class.
  • This class will have both properties and methods (functions)
  • It will be exported as a module.

Car Class Specs:

Users of the Car class should be able to specify the following properties when constructing new cars:

  • color (string)
  • convertible (boolean)

Cars should automatically come with the following property:

  • speed (0, at first)

Cars should come with two functions:

  • accelerate
  • decelerate
  • These should take one argument, a number, which is added or subtracted from the current speed

Node modules:

You will notice a package.json file listing specific packages (a.k.a node modules) required for testing this assignment.

Node modules will be vital to this unit and future Javascript projects. In this case, our modules add automated testing functionality to our project.

Run npm install to install packages listed in package.json. This will create a node_modules folder that your project will draw from.

To test your Car class, run npm test to test the features. DO NOT ALTER THE TEST FILE. Continue coding in the Car.js file until all tests pass.

car-node-module's People

Contributors

apexbortz avatar ryanfleharty avatar doireannjane avatar nickschmitt 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.