/excercises

Primary LanguageJavaScript

Learning NodeJs using Unit Testing

Setup

Run bash shell

run cd /mnt/d/dev or go to any location of your choice

if git is not installed, run sudo apt-get update and sudo apt-get install git (which git will return nothing if not installed)

run git clone https://git@github.com/tsngo/excercises ./excercises

run cd excercises

run npm install to install libraries

if there are errors try running npm install again

Getting started

run npm test to run unit tests

edit files under ./lib so that npm test passes all unit tests

Introduction

squareRoot

Reference: http://www.w3schools.com/jsref/jsref_obj_math.asp

piecewise

Reference: http://www.w3schools.com/js/js_comparisons.asp, http://www.w3schools.com/js/js_if_else.asp

floor

Reference: http://www.w3schools.com/jsref/jsref_floor.asp, http://www.w3schools.com/js/js_arithmetic.asp