Skip to content

Ethanng329/functions-and-operators

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

functions-and-operators

Functions and operators exercises. To run

  1. Fork repo
  2. Clone forked repo to local machine
  3. Solve the exercises one at a time and do a git commit and push after each one
  4. Aim to use the right array method where possible instead of for/while loops
  5. Submit a Pull Request after first push this will run tests on the server and let you know if the tests are passing.

Exercises can be debugged in browser by opening index.html.

To run tests locally, make sure you have node and npm installed. You can install it from https://nodejs.org/en/

  1. Run npm install - you only need to run this once after cloning to fetch the external libraries used for testing
  2. Run npm test - this will run the actual tests

The tests are located in test/index.test.js. To run a test for only single function, you can change the test function name from test to test.only. This will limit the amount of output you receive from each test run and make it easier to focus on the function you are working on.

for example change

test('Add', () => {
  const result = add( 2, 3 );

  expect( result ).toEqual( 5 );
});

to

test.only('Add', () => {
  const result = add( 2, 3 );

  expect( result ).toEqual( 5 );
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.9%
  • HTML 1.1%