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>