Javascript Basics

Complete the following exercises to improve your understanding of functions, arrays and objects in javascript!

Getting Started

  • Fork this repo
  • git clone <repo-url>
  • cd into directory

Instructions:

  • Follow the instructions in 1-functions.js, 2-arrays.js and 3-objects.js.
  • As opposed to manually checking the output every time you run the function, we've written a helper method (helper.test()) to help you check whether your code produces the expected output.
  • Test that your function runs correctly using helper.test(yourFunction(), yourExpectedValue). To run the test, run node myfile.js (e.g. node 1-functions.js) in your terminal
  • For each function, add 1-2 more test cases to confirm that your function really works.

Copyright (c) 2018 ThoughtWorks. For personal use and training purposes only; not to be copied or distributed without further approval.