Skip to content

Latest commit

 

History

History
50 lines (29 loc) · 2.54 KB

README.md

File metadata and controls

50 lines (29 loc) · 2.54 KB

Exercises in JavaScipt

MIT Licence Build Status

A couple of programming exercises I thought would be fun to try.

Content:

New Exercise

It's not perfect yet, but for a new exercise do:

  1. Create a new exercise in src/exercise/.js
  2. Create the test in test/exercise/-test.js_
  3. Create the data (name and HTML mostly) for this exercise in src/exercise-data/.js
  4. Add an implementation of your exercise to src/exercise-data.js
  5. Add the copied exercise file as a script to the index.html

Or you can use the script node script/create-new-exercise.js which does everything but the last step for you.

Exercises

  • Framed Words - Write a function that takes a list of strings an prints them, one per line, in a rectangular frame.
  • Hangman AI - Write a program that plays Hangman as good as possible.
  • Pig Latin - Write function that translates a text to Pig Latin and back.
  • Spoon Language - The spoon language is the German pig latin. The language is based on the exchange of the vowels of a word by fixed abbreviations, whereby the consonants of the word remain untouched.

Test Report

I'm really proud of my test report (live version):

test-report

To see how it is generated see this XSL Transformation File and this npm module @slothsoft/qunit-reporter.