SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: letter loop

Hybrid View

  1. #1
    SitePoint Guru
    Join Date
    Apr 2001
    Location
    BC, Canada
    Posts
    630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    letter loop

    is it possible to have a loop that increments one letter?

    for example

    x='a';
    while (x < 'zzzzzzz')
    {
    //do something to increment a to b
    }

    once a gets to z it becomes aa then ab and ac and so on

    is it possible?

  2. #2
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Normally you would do this with numbers. Does anyone know if this can be done incrementally with letters? I will check into my JavaScript reference book.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •