Skip to main content

Array Exercises

The marked file is the file you'll be using in the part of the assignment.

  .
├── exercises
│ ..
│ ├── array-exercises
│ │ ├── css
│ │ │ └── style.css
│ │ ├── js
│ │ │ ├── __tests__
│ │ │ │ └── stringsExercises.js
│ │ │ ├── app.js
--│ │ │ └── array.js ⬅️
│ │ └── index.html
│ └── ..
..

when opening the project in your browser, you will need to navigate to the string exercises assignment page to see the result of your work on the web page.

Some of these exercises are already done on the JS Exercises Assignment..

Instructions

  1. Open the array exercises html file in your browser: exercises/array-exercises/index.html
    • 🦉: Use Visual Studio Code's Live Server extension to open the file in your browser with live reloading.
    • 🦉: You can also run npm start to start a local server.
  2. Notice how the different input fields are already populated with some input.
    • Although they're only string input, behind the scenes (in the app.js file), they're being split at the , and being treated as strings.
    • You may change the input, but make sure you use the same convention.
    • Your tasks here would be provide the correct implementation for the various methods in the exercises/array-exercises/js/strings.js file.
  3. To run the automated checks for this assignment, run the following command: npm run test:unit:array.