Skip to main content

String Exercises

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

  .
โ”œโ”€โ”€ exercises
โ”‚ ..
โ”‚ โ”œโ”€โ”€ string-exercises
โ”‚ โ”‚ โ”œโ”€โ”€ css
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ style.css
โ”‚ โ”‚ โ”œโ”€โ”€ js
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ __tests__
โ”‚ โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ stringsExercises.js
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ app.js
--โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ strings.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 string exercises html file in your browser: exercises/string-exercises/index.html
  2. Type something in the textarea; notice how the text is presented back as is in the paragraphs underneath.
    • Your tasks here would be provide the correct implementation for the various methods in the exercises/string-exercises/js/strings.js file.
  3. To run the automated checks for this assignment, run the following command: npm run test:unit:string.

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.