Recursive | Simple | Faster | JavaScript Submission
Please do upvote, it motivates me to write more such posts\uD83D\uDE03\n\n\nvar CombinationIterator = function(characters, combinationLength) {\n    this.arr = 
**Please do upvote, it motivates me to write more such posts\uD83D\uDE03**\n\n```\nvar CombinationIterator = function(characters, combinationLength) {\n    this.arr = build(combinationLength, characters.split("").sort().join(""));\n    this.pos = 0;   \n};\n\n/**\n * @return {string}\n */\nCombinationIterator.prototype.next = function() {\n    if(this.pos<this.arr.length){\n        return this.arr[this.pos++];\n    }\n};\n\n/**\n * @return {boolean}\n */\nCombinationIterator.prototype.hasNext = function() {\n    return this.pos<this.arr.length;\n};\n\nfunction build(max, str, out = [], curr = ""){\n    if(curr.length === max){\n        out.push(curr);\n        return ;\n    }\n    else{\n        for(let i = 0; i<str.length; i++){\n            build(max, str.slice(i+1), out, curr + str[i]);\n        }\n    }\n    \n    return out;\n}\n```\n\n***if you have any question, do comment\nI would love to clarify them\uD83C\uDFC4\u200D***\n
['Recursion', 'JavaScript']