https://github.com/ruthmoog/makers_middle-character-js
solve the middle letter kata with TDD
https://github.com/ruthmoog/makers_middle-character-js
Last synced: 2 months ago
JSON representation
solve the middle letter kata with TDD
- Host: GitHub
- URL: https://github.com/ruthmoog/makers_middle-character-js
- Owner: ruthmoog
- Created: 2019-08-23T16:45:08.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-23T17:34:39.000Z (over 5 years ago)
- Last Synced: 2025-01-26T05:44:44.536Z (4 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Middle Character Kata
Challenge: return the middle character of a word. If the word's length is odd, return the middle character. If the word's length is even, return the middle 2 characters.
## Acceptance Criteria
- get_middle("test") # => "es"
- get_middle("testing") # => "t"
- get_middle("middle") # => "dd"
- get_middle("A") # => "A"
- get_middle("of") # => "of"## Running the Program
The program runs in the browser console.
Open the `index.html` file in the browser then open the console in the developer tools.## Approach
I used this kata to practise writing JavaScript and TDD with vanilla JS tests.