Skip to content

Instantly share code, notes, and snippets.

@joshblack
Created May 12, 2015 19:30
Show Gist options
  • Save joshblack/8a5716ac2ad0c314c59e to your computer and use it in GitHub Desktop.
Save joshblack/8a5716ac2ad0c314c59e to your computer and use it in GitHub Desktop.
Class name problem
/**
* Write a function that generates a unique class name every time
* that it's called. The class name should follow the following
* pattern:
*
* fn(); // returns 'a'
* fn(); // returns 'b'
* ...
* fn(); // returns 'z'
* fn(); // returns 'aa'
* fn(); // returns 'ab'
* ...
* fn(); // returns 'zz'
* fn(); // returns 'aaa'
*
* And so on and so forth.
*/
function className() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment