I need a function similar to the ones explained here...
JS function for writing out a word, binary counter style
...but using base 7 (or others) to generate (count) letters up from A to G Like so...
---a
---b
---c
---d
---e
---f
---g
--aa
--ab
--ac
--ad
--ae
--af
etc. up to gggg
Is there a simple way to change one of those functions to make this happen?
p.s. This is pretty cool...
They used...
var iterations = Math.pow(2,str.length)
and Math.pow(string.length,2)
They both work but only because the string length was 4 and the base was 2
inadvertently correct
i.e 4^2=16 2^4=16
If any other string length was used one of them becomes wrong.
i.e. 2^10=1024 10^2=100