/string-calculator-kata

My implementation of the popular String Calculator Kata (original description: http://osherove.com/tdd-kata-1)

Primary LanguageJavaScript

String Calculator Kata

My implementation of the popular String Calculator Kata (original description: http://osherove.com/tdd-kata-1) in Ruby and JavaScript up to step 6, which means it does the following:

  • sums an unlimited amount of comma separated numbers provided as a string
  • allows for custom separators to be defined at the beginning of the string using the format //[delimiter]\n[your numbers]
  • throws an exception if negative numbers are detected
  • filters out numbers larger than 1000

Instructions