Giter Club home page Giter Club logo

javascript-exercises's Introduction

<<<<<<< HEAD

JavaScript Exercises

These JavaScript exercises are intended to complement the JavaScript content on The Odin Project (TOP). They should only be done when instructed during the course of the curriculum.

Note: The generator-exercise file is not actually an exercise; it is a script that generates exercises. It was created to help efficiently write these exercises.

Contributing

If you have a suggestion to improve an exercise, an idea for a new exercise, or notice an issue with an exercise, please feel free to open an issue after thoroughly reading our contributing guide in our main TOP repo.

How To Use These Exercises

  1. Fork and clone this repository. To learn how to fork a repository, see the GitHub documentation on how to fork a repo.
    • Copies of repositories on your machine are called clones. If you need help cloning to your local environment you can learn how from the GitHub documentation on cloning a repository.
  2. Before you start working on any execises, you should first ensure you have the following installed:
    • NPM. You should have installed NPM already in our Installing Node.js lesson. Just in case you need to check, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do not follow the instructions in the terminal to install with apt-get as this causes permission issues. Instead, go back to the installation lesson and install Node with NVM by following the instructions there.
    • Jest. After cloning this repository to your local machine and installing NPM, go into the newly created directory (cd javascript-exercises) and run npm install. This will install Jest and set up the testing platform based on our preconfigured settings.
  3. Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output.
    • When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass.
  4. Some of the exercises have test conditions defined in their spec file as test.skip compared to test. This is purposeful. After you pass one test, you will change the next test.skip to test and test your code again. You'll do this until all conditions are satisfied. All tests must pass at the same time, and you should not have any test.skip instances by the time you finish an exercise.
  5. Once you successfully finish an exercise, check TOP's solutions branch to compare it with yours.
    • You should not be checking the solution for an exercise until you finish it!
    • Keep in mind that TOP's solution is not the only solution. Generally as long as all of the tests pass, your solution should be fine.
  6. Do not submit your solutions to this repo, as any PRs that do so will be closed without merging.

Note: Due to the way Jest handles failed tests, it may return an exit code of 1 if any tests fail. NPM will interpret this as an error and you may see some npm ERR! messages after Jest runs. You can ignore these, or run your test with npm test exerciseName.spec.js --silent to supress the errors.

The first exercise, helloWorld, will walk you through the process in-depth.

Debugging

To debug functions, you can run the tests in the Visual Studio Code debugger terminal. You can open this by clicking the "Run and Debug" icon on the left or pressing ctrl + shift + D, then clicking JavaScript Debug Terminal. You will be able to set breakpoints as you would in the Chrome DevTools debugger. You can run npm test exerciseName.spec.js to then execute your code up until your breakpoint and step through your code as necessary. NOTE: To take advantage of the debugger, you MUST run the script in the debugger terminal, not the bash or zsh terminal.

<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD

JavaScript Exercises

======= These are a series of javascript exercises intended to be used alongside the curriculum at 'The Odin Project' . They start very simply, but get more involved as you progress through them.

1c4b1a6 (Update readme.md)

<<<<<<< HEAD These JavaScript exercises are intended to complement the JavaScript content on The Odin Project (TOP). They should only be done when instructed during the course of the curriculum.

These are a series of javascript exercises intended to be used alongside the curriculum at 'The Odin Project'. They start simple and easy, but get more complex and involved as you progress through them.

There will eventually be a suggested order of completion, but at this time since we are still in the process of creating more exercises the order is subject to change and has not yet been specified. However, there are a few exercises which make a good "starting point". Feel free to at least start with these:

2563ec7 (Additional revisions to README)

Note: The generator-exercise file is not actually an exercise; it is a script that generates exercises. It was created to help efficiently write these exercises.

Contributing

If you have a suggestion to improve an exercise, an idea for a new exercise, or notice an issue with an exercise, please feel free to open an issue after thoroughly reading our contributing guide in our main TOP repo.

=======

94a2956 (Remove irrelevant text about order of completion)

How To Use These Exercises

<<<<<<< HEAD <<<<<<< HEAD Before you start you should have a few things installed on your machine: <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD

  1. NPM. To check if you have NPM installed, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get. (This causes permission issues.) Instead, install Node with NVM by following the instructions here. <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD
  2. Jest. Jest is a testing framework for JavaScript. To install it, type npm install --save-dev jest. We use --save-dev here to specify this module is for development purposes only. <<<<<<< HEAD <<<<<<< HEAD
  3. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here. =======
  4. NPM. To check if you have NPM installed, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get. (This causes permission issues.) Instead, install Node with NVM by following the instructions here. ======= ======= =======
  5. NodeJS. To check if you have it type node -v in a terminal. If you get back a number bigger than 6 that means you've got it installed. Best way to install node is with NVM. Check link for instructions here =======
  6. NPM. To check if you have it type npm --version in a terminal. If you get back Command 'npm' not found, but can be installed with:, install NPM/Node with NVM. Not with apt-get (it causes permission issues). Check link for instructions here

ec08e8c (Changes node version to NPM)

  1. Jasmine. Jasmine is a testing framework for Javascript. Type jasmine -v to check for it. If you need to install it type npm install -g jasmine to do so. <<<<<<< HEAD

7de28f5 (Update README.md) =======

  1. Clone this repo and get started.

26ecd35 (Add more granular instructions) =======

  1. NPM. To check if you have NPM, type npm --version in a terminal. If you're using Linux and you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get (this causes permission issues). Instead, install NPM/Node with NVM by following the instructions here. =======
  2. NPM. To check if you have NPM, type npm --version in a terminal. If you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get (this causes permission issues). Instead, install NPM/Node with NVM by following the instructions here. <<<<<<< HEAD <<<<<<< HEAD

de6c2ff (Remove Linux-specific wording)

  1. Node. Type node -v to check for it. If you need to install it, type npm install node. =======
  2. Node. Type node -v to check for it. If you need to install it, type nvm install node.

e455c78 (Fixes incorrect directions) =======

  1. Node. Type whereis node You should see /home/<your name>/.nvm/.... If you do not see this path, you need to install it, type nvm install node to do so.

a52257e (Update README.md) =======

  1. NPM. To check if you have NPM, type npm --version in a terminal. If you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get (this causes permission issues). Instead, install NPM/Node with NVM by following the instructions here.

e0a0119 (updates to show Odin directions) =======

  1. NPM. To check if you have NPM, type npm --version in a terminal. If you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get (this causes permission issues). Instead, install NPM/Node with NVM by following the instructions here.

cc479b5 (Update README.md) =======

  1. NPM. To check if you have NPM, type npm --version in a terminal. If you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get (this causes permission issues). Instead, install NPM/Node with NVM by following the instructions here.

2c5bb33 (Update node installation link)

  1. Jasmine. Jasmine is a testing framework for Javascript. Type jasmine -v to check for it. If you need to install it, type npm install -g jasmine to do so.
  2. Clone this repo and get started.

dfa97ee (Update installation instructions)

<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD

94a2956 (Remove irrelevant text about order of completion)

  1. NPM. We should have installed NPM already in this Installing Node.js lesson. Just in case you need to check, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get. (This causes permission issues.) Instead, go back to the installation lesson and install Node with NVM by following the instructions there. <<<<<<< HEAD

de3f9c9 (Update NPM instruction to new lesson link)

  1. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here. =======
  2. A fork and clone of this repository. To learn how to fork a repository, see the GitHub documentation on how to fork a repo.
    • Copies of repositories on your machine are called clones. If you need help cloning to your local environment you can learn how from the GitHub documentation on cloning a repository.

bac8139 (Update README.md)

  1. Jest. After cloning this repository to your local machine, go into the newly created directory (cd javascript-exercises) and run npm install. This will install Jest and set up the testing platform based on our preconfigured settings.

438d07c (Clarify Jest installation instructions) ======= Each exercise includes 3 files, a markdown file with a description of the task, an empty (or mostly empty) javascript file, and a set of tests. To complete the exercise go to the exercise directory in a terminal and run jasmine filename.spec.js. This should find and run the test file and show you the output. Upon first running the tests you will find that the tests fail: this is by design! Your task is to open up the javascript file and write the code needed to get all of the tests to pass. Some of the exercises have test conditions defined in the spec file that are defined as 'xit' compared to 'it'. This is purposeful, and as you test your solution against the first 'it', on success you will change the next 'xit' to an 'it' and test your code again, until all conditions are satisfied. e4f5cba (Update README.md) ======= Each exercise includes 3 files, a markdown file with a description of the task, an empty (or mostly empty) javascript file, and a set of tests. To complete the exercise go to the exercise directory (cd helloWorld) in a terminal and run jasmine filename.spec.js. This should find and run the test file and show you the output. Upon first running the tests you will find that the tests fail: this is by design! Your task is to open up the javascript file and write the code needed to get all of the tests to pass. Some of the exercises have test conditions defined in the spec file that are defined as 'xit' compared to 'it'. This is purposeful, and as you test your solution against the first 'it', on success you will change the next 'xit' to an 'it' and test your code again, until all conditions are satisfied. 9e2e299 (Update README.md) ======= Each exercise includes 3 files, a markdown file with a description of the task, an empty (or mostly empty) javascript file, and a set of tests. To complete the exercise go to the exercise directory with cd helloWorld in a terminal and run jasmine filename.spec.js. This should find and run the test file and show you the output. Upon first running the tests you will find that the tests fail: this is by design! Your task is to open up the javascript file and write the code needed to get all of the tests to pass. Some of the exercises have test conditions defined in the spec file that are defined as 'xit' compared to 'it'. This is purposeful, and as you test your solution against the first 'it', on success you will change the next 'xit' to an 'it' and test your code again, until all conditions are satisfied. 26d610c (Update README.md)

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass.

These are a series of JavaScript exercises intended to be used alongside the curriculum at 'The Odin Project'. They start simple and easy but get more complex and involved as you progress through them.

JavaScript Exercises

1b43007 (Update README.md)

<<<<<<< HEAD These JavaScript exercises are intended to complement the JavaScript content on The Odin Project (TOP). They should only be done when instructed during the course of the curriculum.

Note: The generator-exercise file is not actually an exercise; it is a script that generates exercises. It was created to help efficiently write these exercises.

Contributing

If you have a suggestion to improve an exercise, an idea for a new exercise, or notice an issue with an exercise, please feel free to open an issue after thoroughly reading our contributing guide in our main TOP repo.

=======

edb9c24 (Remove irrelevant text about order of completion)

How To Use These Exercises

<<<<<<< HEAD <<<<<<< HEAD Before you start you should have a few things installed on your machine: <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD

  1. NPM. To check if you have NPM installed, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get. (This causes permission issues.) Instead, install Node with NVM by following the instructions here. <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD
  2. Jest. Jest is a testing framework for JavaScript. To install it, type npm install --save-dev jest. We use --save-dev here to specify this module is for development purposes only. <<<<<<< HEAD <<<<<<< HEAD
  3. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here. =======
  4. NPM. To check if you have NPM installed, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get. (This causes permission issues.) Instead, install Node with NVM by following the instructions here. ======= =======

edb9c24 (Remove irrelevant text about order of completion)

  1. NPM. We should have installed NPM already in this Installing Node.js lesson. Just in case you need to check, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do NOT follow the instructions in the terminal to install with apt-get. (This causes permission issues.) Instead, go back to the installation lesson and install Node with NVM by following the instructions there. <<<<<<< HEAD

7a9377f (Update NPM instruction to new lesson link)

  1. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here. =======
  2. A fork and clone of this repository. To learn how to fork a repository, see the GitHub documentation on how to fork a repo.
    • Copies of repositories on your machine are called clones. If you need help cloning to your local environment you can learn how from the GitHub documentation on cloning a repository.

1b43007 (Update README.md)

  1. Jest. After cloning this repository to your local machine, go into the newly created directory (cd javascript-exercises) and run npm install. This will install Jest and set up the testing platform based on our preconfigured settings.

4355657 (Clarify Jest installation instructions)

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass.

Some of the exercises have test conditions defined in their spec file that are defined as 'test.skip' compared to 'test'. This is purposeful. After you pass your first 'test', you will change the next 'test.skip' to 'test' and test your code again. You'll do this until all conditions are satisfied. ALL TESTS MUST PASS AT THE SAME TIME.

  1. Before you start you should have a few things installed on your machine:
    • NPM. We should have installed NPM already in our Installing Node.js lesson. Just in case you need to check, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do not follow the instructions in the terminal to install with apt-get as this causes permission issues. Instead, go back to the installation lesson and install Node with NVM by following the instructions there.
    • Jest. After cloning this repository to your local machine, go into the newly created directory (cd javascript-exercises) and run npm install. This will install Jest and set up the testing platform based on our preconfigured settings.
  2. Fork and clone this repository. To learn how to fork a repository, see the GitHub documentation on how to fork a repo. =======
  3. Fork and clone this repository. To learn how to fork a repository, see the GitHub documentation on how to fork a repo.

67d4d0a (Update README.md) * Copies of repositories on your machine are called clones. If you need help cloning to your local environment you can learn how from the GitHub documentation on cloning a repository.

  1. Before you start working on any execises, you should first ensure you have the following installed:
    • NPM. You should have installed NPM already in our Installing Node.js lesson. Just in case you need to check, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do not follow the instructions in the terminal to install with apt-get as this causes permission issues. Instead, go back to the installation lesson and install Node with NVM by following the instructions there.
    • Jest. After cloning this repository to your local machine and installing NPM, go into the newly created directory (cd javascript-exercises) and run npm install. This will install Jest and set up the testing platform based on our preconfigured settings.
  2. Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output.
    • When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass.
  3. Some of the exercises have test conditions defined in their spec file as test.skip compared to test. This is purposeful. After you pass one test, you will change the next test.skip to test and test your code again. You'll do this until all conditions are satisfied. All tests must pass at the same time, and you should not have any test.skip instances by the time you finish an exercise.
  4. Once you successfully finish an exercise, check TOP's solutions branch to compare it with yours.
    • You should not be checking the solution for an exercise until you finish it!
    • Keep in mind that TOP's solution is not the only solution. Generally as long as all of the tests pass, your solution should be fine.
  5. Do not submit your solutions to this repo, as any PRs that do so will be closed without merging.

0760595 (Update README.md)

Note: Due to the way Jest handles failed tests, it may return an exit code of 1 if any tests fail. NPM will interpret this as an error and you may see some npm ERR! messages after Jest runs. You can ignore these, or run your test with npm test exerciseName.spec.js --silent to supress the errors.

  1. Jasmine. Jasmine is a testing framework for JavaScript. Type jasmine -v to check for it. If you need to install it, type npm install -g jasmine to do so.
  2. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run jasmine exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass. Some of the exercises have test conditions defined in their spec file that are defined as 'xit' compared to 'it'. This is purposeful. After you pass your first 'it', you will change the next 'xit' to an 'it' and test your code again. You'll do this until all conditions are satisfied.

b2f2211 (Revert "Resolve merge conflicts") =======

  1. Jest. Jest is a testing framework for JavaScript. To install it, type npm install --save-dev jest. We use --save-dev here to specify this module is for development purposes only.
  2. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass. Some of the exercises have test conditions defined in their spec file that are defined as 'xit' compared to 'it'. This is purposeful. After you pass your first 'it', you will change the next 'xit' to an 'it' and test your code again. You'll do this until all conditions are satisfied.

cb3ffc0 (Revert "Update README with Jest specific language. Update some spec files with new syntax") =======

  1. Jasmine. Jasmine is a testing framework for JavaScript. Type jasmine -v to check for it. If you need to install it, type npm install -g jasmine to do so.
  2. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run jasmine exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass. Some of the exercises have test conditions defined in their spec file that are defined as 'xit' compared to 'it'. This is purposeful. After you pass your first 'it', you will change the next 'xit' to an 'it' and test your code again. You'll do this until all conditions are satisfied.

d79bdb9 (Revert "Change references from Jasmine to Jest in main readme")

<<<<<<< HEAD The first exercise, helloWorld, will help the process become clearer.

d6977b1 (Updated Cogency, Syntax, and Clone Explanation) ======= The first exercise, helloWorld, will walk you through the process in-depth. 6e0ae18 (Updated README)

<<<<<<< HEAD Some of the exercises have test conditions defined in their spec file that are defined as 'test.skip' compared to 'test'. This is purposeful. After you pass your first 'test', you will change the next 'test.skip' to 'test' and test your code again. You'll do this until all conditions are satisfied. ALL TESTS MUST PASS AT THE SAME TIME.

  1. Before you start you should have a few things installed on your machine:
    • NPM. We should have installed NPM already in our Installing Node.js lesson. Just in case you need to check, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do not follow the instructions in the terminal to install with apt-get as this causes permission issues. Instead, go back to the installation lesson and install Node with NVM by following the instructions there.
    • Jest. After cloning this repository to your local machine, go into the newly created directory (cd javascript-exercises) and run npm install. This will install Jest and set up the testing platform based on our preconfigured settings.
  2. Fork and clone this repository. To learn how to fork a repository, see the GitHub documentation on how to fork a repo. =======
  3. Fork and clone this repository. To learn how to fork a repository, see the GitHub documentation on how to fork a repo.

af7892f (Update README.md) * Copies of repositories on your machine are called clones. If you need help cloning to your local environment you can learn how from the GitHub documentation on cloning a repository.

  1. Before you start working on any execises, you should first ensure you have the following installed:
    • NPM. You should have installed NPM already in our Installing Node.js lesson. Just in case you need to check, type npm --version in your terminal. If you get back Command 'npm' not found, but can be installed with:, do not follow the instructions in the terminal to install with apt-get as this causes permission issues. Instead, go back to the installation lesson and install Node with NVM by following the instructions there.
    • Jest. After cloning this repository to your local machine and installing NPM, go into the newly created directory (cd javascript-exercises) and run npm install. This will install Jest and set up the testing platform based on our preconfigured settings.
  2. Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output.
    • When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass.
  3. Some of the exercises have test conditions defined in their spec file as test.skip compared to test. This is purposeful. After you pass one test, you will change the next test.skip to test and test your code again. You'll do this until all conditions are satisfied. All tests must pass at the same time, and you should not have any test.skip instances by the time you finish an exercise.
  4. Once you successfully finish an exercise, check TOP's solutions branch to compare it with yours.
    • You should not be checking the solution for an exercise until you finish it!
    • Keep in mind that TOP's solution is not the only solution. Generally as long as all of the tests pass, your solution should be fine.
  5. Do not submit your solutions to this repo, as any PRs that do so will be closed without merging.

6911751 (Update README.md)

<<<<<<< HEAD Note: Due to the way Jest handles failed tests, it may return an exit code of 1 if any tests fail. NPM will interpret this as an error and you may see some npm ERR! messages after Jest runs. You can ignore these, or run your test with npm test exerciseName.spec.js --silent to supress the errors. <<<<<<< HEAD

  1. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass. Some of the exercises have test conditions defined in their spec file that are defined as 'xit' compared to 'it'. This is purposeful. After you pass your first 'it', you will change the next 'xit' to an 'it' and test your code again. You'll do this until all conditions are satisfied.

3c333cc (Change references from Jasmine to Jest in main readme) =======

  1. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here. =======
  2. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here.
  3. Jest. Jest is a testing framework for JavaScript. To install it, navigate to your local copy of the repository and type npm install --save-dev jest. We use --save-dev here to specify this module is for development purposes only.

6f98488 (Backtrack on .gitignore modification, add instructions to readme) =======

  1. Jest. Jest is a testing framework for JavaScript. To install it, type npm install --save-dev jest. We use --save-dev here to specify this module is for development purposes only.
  2. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here.

6100ad4 (move files from testing repo to this repo) =======

  1. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here. =======
  2. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here.
  3. Jest. Jest is a testing framework for JavaScript. To install it, navigate to your local copy of the repository and type npm install --save-dev jest. We use --save-dev here to specify this module is for development purposes only.

fb30467 (Backtrack on .gitignore modification, add instructions to readme) =======

  1. Jest. Jest is a testing framework for JavaScript. To install it, type npm install --save-dev jest. We use --save-dev here to specify this module is for development purposes only.
  2. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here.

35d7948 (move files from testing repo to this repo)

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass. Some of the exercises have test conditions defined in their spec file that are defined as 'test.skip' compared to 'test'. This is purposeful. After you pass your first 'test', you will change the next 'test.skip' to an 'test' and test your code again. You'll do this until all conditions are satisfied.

<<<<<<< HEAD Note: Due to the way Jest handles failed tests, it will return an exit code of 1 if any tests fail. NPM will interpret this as an error and you may see some npm ERR! messages after Jest runs. You can ignore these, or run your test with npm test exerciseName.spec.js --silent to supress the errors.

e73c68f (Update README with Jest specific language. Update some spec files with new syntax) ======= Note: Due to the way Jest handles failed tests, it will return an etest.skip code of 1 if any tests fail. NPM will interpret this as an error and you may see some npm ERR! messages after Jest runs. You can ignore these, or run your test with npm test exerciseName.spec.js --silent to supress the errors. 35d7948 (move files from testing repo to this repo)

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass. Some of the exercises have test conditions defined in their spec file that are defined as 'test.skip' compared to 'test'. This is purposeful. After you pass your first 'test', you will change the next 'test.skip' to an 'test' and test your code again. You'll do this until all conditions are satisfied.

<<<<<<< HEAD Note: Due to the way Jest handles failed tests, it will return an exit code of 1 if any tests fail. NPM will interpret this as an error and you may see some npm ERR! messages after Jest runs. You can ignore these, or run your test with npm test exerciseName.spec.js --silent to supress the errors.

cbcffda (Update README with Jest specific language. Update some spec files with new syntax) ======= Note: Due to the way Jest handles failed tests, it will return an etest.skip code of 1 if any tests fail. NPM will interpret this as an error and you may see some npm ERR! messages after Jest runs. You can ignore these, or run your test with npm test exerciseName.spec.js --silent to supress the errors. 6100ad4 (move files from testing repo to this repo) ======= 8554b0f (Fix words caught by search/replace action.) =======

  1. Jasmine. Jasmine is a testing framework for JavaScript. Type jasmine -v to check for it. If you need to install it, type npm install -g jasmine to do so.
  2. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run jasmine exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass. Some of the exercises have test conditions defined in their spec file that are defined as 'xit' compared to 'it'. This is purposeful. After you pass your first 'it', you will change the next 'xit' to an 'it' and test your code again. You'll do this until all conditions are satisfied.

cf2850f (Revert "Resolve merge conflicts") =======

  1. Jest. Jest is a testing framework for JavaScript. To install it, type npm install --save-dev jest. We use --save-dev here to specify this module is for development purposes only.
  2. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here

<<<<<<< HEAD Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass. Some of the exercises have test conditions defined in their spec file that are defined as 'xit' compared to 'it'. This is purposeful. After you pass your first 'it', you will change the next 'xit' to an 'it' and test your code again. You'll do this until all conditions are satisfied.

c9d7f3e (Revert "Update README with Jest specific language. Update some spec files with new syntax") =======

  1. Jasmine. Jasmine is a testing framework for JavaScript. Type jasmine -v to check for it. If you need to install it, type npm install -g jasmine to do so.
  2. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run jasmine exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass. Some of the exercises have test conditions defined in their spec file that are defined as 'xit' compared to 'it'. This is purposeful. After you pass your first 'it', you will change the next 'xit' to an 'it' and test your code again. You'll do this until all conditions are satisfied.

740065f (Revert "Change references from Jasmine to Jest in main readme") =======

  1. A copy of this repository. Copies of repositories on your machine are called clones. If you need help cloning, you can learn how here

Each exercise includes 3 files: a markdown file with a description of the task, an empty (or mostly empty) JavaScript file, and a set of tests. To complete an exercise, you'll need to go to the exercise directory with cd exerciseName in the terminal and run npm test exerciseName.spec.js. This should run the test file and show you the output. When you first run a test, it will fail. This is by design! You must open the exercise file and write the code needed to get the test to pass. Some of the exercises have test conditions defined in their spec file that are defined as 'xit' compared to 'it'. This is purposeful. After you pass your first 'it', you will change the next 'xit' to an 'it' and test your code again. You'll do this until all conditions are satisfied.

91d5028 (Change references from Jasmine to Jest in main readme)

=======

7012b3d (Revert "Merge branch 'jest'") ======= ad1c0c4 (Revert "Merge branch 'jest'") The first exercise, helloWorld, will walk you through the process in-depth.

Debugging

<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD

To debug functions, you can run the tests in the Visual Studio Code debugger terminal. You can open this by clicking the "Run and Debug" icon on the left or pressing ctrl + shift + D, then clicking JavaScript Debug Terminal. You will be able to set breakpoints as you would in the Chrome DevTools debugger. You can run npm test exerciseName.spec.js to then execute your code up until your breakpoint and step through your code as necessary. NOTE: To take advantage of the debugger, you MUST run the script in the debugger terminal, not the bash or zsh terminal. <<<<<<< HEAD

edb9c24 (Remove irrelevant text about order of completion)

To debug functions, you can run the tests in the Visual Studio Code debugger terminal. You can open this by clicking the "Run and Debug" icon on the left or pressing ctrl + shift + D, then clicking JavaScript Debug Terminal. You will be able to set breakpoints as you would in the Chrome DevTools debugger. You can run npm test exerciseName.spec.js to then execute your code up until your breakpoint and step through your code as necessary. NOTE: To take advantage of the debugger, you MUST run the script in the debugger terminal, not the bash or zsh terminal.

======= To debug functions, you can run the tests in the visual code studio debugger terminal (open this by clicking the "Run and Debug" icon on the left or pressing ctrl + shift + D, then clicking JavaScript Debug Terminal). In your code you are able to set breakpoints as you would in the Chrome devtools debugger. You can run npm test exerciseName.spec.js to then execute your code up until your breakpoint and step through your code as necessary.

To debug functions, you can run the tests in the Visual Studio Code debugger terminal. You can open this by clicking the "Run and Debug" icon on the left or pressing ctrl + shift + D, then clicking JavaScript Debug Terminal. You will be able to set breakpoints as you would in the Chrome DevTools debugger. You can run npm test exerciseName.spec.js to then execute your code up until your breakpoint and step through your code as necessary. NOTE: To take advantage of the debugger, you MUST run the script in the debugger terminal, not the bash or zsh terminal.

702d983 (Update README.md)

79e57dd (Update README.md)

Solutions

Solutions for these exercises can be found in this repo on the 'solutions' branch. <<<<<<< HEAD <<<<<<< HEAD

950ab79 (Update README.md) =======

A quick note!

<<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD The generator exercise is not actually an exercise… it is a script that generates exercises. I was using it when I wrote them so I didn’t have to hack out the same boilerplate code every time I wrote a new one.

159d100 (Update README.md) ======= The generator exercise is not actually an exercise… it is a script that generates exercises. I was using it when I wrote them so, I didn’t have to hack out the same boilerplate code every time I wrote a new one. 1c4b1a6 (Update readme.md) ======= The generator exercise is not actually an exercise… it is a script that generates exercises. I was using it when I wrote them so I didn’t have to hack out the same boilerplate code every time I wrote a new one. 2563ec7 (Additional revisions to README) ======= The exercise generator-exercise is not actually an exercise; it is a script that generates exercises. It was created to help efficiently write these exercises. d6977b1 (Updated Cogency, Syntax, and Clone Explanation) ======= 1b43007 (Update README.md) ======= 0760595 (Update README.md) feature

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.