Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript OOP Practice

Purpose

This practice touches the following:

  1. Basics of prototype inheritance.
  2. ES6 features.
  3. BDD with Mocha and Chai.
  4. NPM infrastructure.

Spacify

Overview

Please implement spacify function extending prototype of native String class. This function should compute string with space injected between chars of the original string. As follows:

  • "ABC".spacify() // "A B C"
  • "A".spacify() // "A"
  • "".spacify() // ""

Do not do such dirty things in production. This task is just for understanding of prototype inheritance.

Please take a look at bind operator for inspiration.

Steps

  1. Fork this repository.
  2. Checkout forked repository.
  3. Install Node.js.
  4. Install project dependencies by npm install.
  5. Run tests by npm run test (tests should fail).
  6. Go to the src folder and implement spacify module.
  7. Tune ESLint to complete this task without static analysis errors.
  8. Check your progress against specification (tests).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages