From 28cc9a890e3eb739cbdead6e2de89fb40a0219c6 Mon Sep 17 00:00:00 2001 From: Chris Kwan Date: Tue, 3 Nov 2015 22:46:01 -0500 Subject: [PATCH] Add answers for strings --- app/strings.js | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 app/strings.js diff --git a/app/strings.js b/app/strings.js new file mode 100644 index 0000000..16d9d34 --- /dev/null +++ b/app/strings.js @@ -0,0 +1,70 @@ +exports = (typeof window === 'undefined') ? global : window; + +exports.stringsAnswers = { + reduceString: function(str, amount) { + var newStr = []; + var prevLetter; + var curLetter; + var curCount = 0; + for (var i=0; i