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.

These exercises will also help you when working on the JS Exercises Assignment.

Instructionsโ€‹

  1. Open the array exercises html file in your browser: exercises/array-exercises/index.html
  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.

Though the web page, only requires you to implement 3 of those methods, the remainder are required to demonstrate your understanding of the JS functions. AND you'll need it for the JS Exercises assignment any way.