for loop alphabet javascript

Get all alphabet in javascript

Some time you need all aplhabet by a for loop. It is very easy in JavaScript. In below exapmle I have created all option of a dropdown by a for loop.

<!DOCTYPE html>
  <title>Get all alphabet in javascrip</title>
  <script src="" type="text/javascript"></script>
  <script type="text/javascript">
    $(function () {
      for (var i = 65; i <= 90; i++) {
        $('.ddlAplhabet').append('<option value="' + String.fromCharCode(i).toLowerCase() + '">' + String.fromCharCode(i).toUpperCase() + '</option>');

  <select class="ddlAplhabet">
    <option>Select aplhabet</option>


  1. very nice article you shared.
    if you want to know the technologies updates,visit below site.

  2. Get this quick reference information to discover your surface finish choices across our six 3D printing applied sciences. Use of this website constitutes acceptance of our User Agreement and Privacy Policy and Cookie Statement and Your California Privacy Rights. PA might earn a portion of sales from merchandise would possibly be} bought by way of our website as part of of} our Affiliate Partnerships with retailers. The material on this website most likely not|will not be} reproduced, Bike Helmets For Kids distributed, transmitted, cached or in any other case used, besides with the prior written permission of PA Ad Choices.