Guest User

Untitled

a guest
May 5th, 2017
544
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. var commandProcessor = (function() {
  2. var text = '';
  3. return {
  4. append: (newText) => text += newText,
  5. removeStart: (count) => text = text.slice(count),
  6. removeEnd: (count) => text = text.slice(0, text.length - count),
  7. print: () => console.log(text)
  8. }
  9. })();
Advertisement
Add Comment
Please, Sign In to add comment