alphabet to acii js code example

Example 1: how to make an alphabet in javascript

// To get an array of letters from 'a' to 'z' in javascript.

let alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');

Example 2: javascript convert between string and ascii

let ascii = 'a'.charCodeAt(0); // 97
let char = String.fromCharCode(ascii); // 'a'

Example 3: character to ascii javascript

"ABC".charCodeAt(0) // returns 65

Example 4: js int to alphabet

var value = 10;

document.write((value + 9).toString(36).toUpperCase());